I'm sure I'm missing something obvious here. I want to include a php file but I need to check if it exists first and every time I run it, I get a failure message. I can see the file is there from my FTP application.
<?
$man_file="/site/67/blog/612.php";
if (file_exists($man_file)){
include($man_file);
}
else
{
echo $man_file;
}
clearstatcache();
?>
Am I missing something?
echo getcwd();just to prove PHP is looking in the directory you think it is$man_file="/site/67/blog/612.php";use a full server path$man_file="/var/usr/public/site/67/blog/612.php";or a relative one. You have been asked what error you get back, the "real" one and on more than one occasion. I can't keep guessing what that is; "file not found"? Other?