Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file_exists function

Status
Not open for further replies.

benrob82

Programmer
Jul 28, 2005
116
0
0
GB
hi can anyone help me with this function.

I've got it working to a point but I need the URL to contain $dir value

Code:
<?php
$dir = $gotevent[0];

$filename = '/var/[URL unfurl="true"]www/sites/crm.url.com/public_html/spgm/gal/$dir';[/URL]

if (file_exists($filename)) {
   echo "<a href='/spgm/index.php?spgmGal=$dir'><img src='/templates/taad/images/gallery.gif' alt='Event gallery - view the pics' width='234' height='37' border='0'></a><br><br>";
} else {
   echo "The file $filename does not exist";
}
?>

the line I'm having trouble with is

Code:
$filename = '/var/[URL unfurl="true"]www/sites/crm.url.com/public_html/spgm/gal/$dir';[/URL]

anye help would be great
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top