because you can't directly use the $annrow[id] within single quotes, you should use double quotes to do so.

file_exists("cherpdocs/$annrow[id].doc")

or

file_exists('cherpdocs/'.$annrow[id].'.doc')

or

file_exists("cherpdocs/".$annrow[id].".doc")

Note: i heared it's prefered to always use the "." when including variables within strings.

Regards,
Khalid Al-Kary
http://creaturesx.ma.cx/kxparse/




Can anyone tell me why this code does not return true when the file in the directory cherpdocs/ with the file (which I see as being there) does exist?

if(file_exists('cherpdocs/$annrow[id].doc')){
echo "<br /><a href=\"cherpdocs/$annrow[id].doc\">Funding details paper</a>";
}


This is a path relative to the file calling it, should it be otherwise?

Thanks
Charles


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to