Richard Young Richard Young - 1 month ago 3
PHP Question

Checking existence of file in same folder

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.

if (file_exists($man_file)){
echo $man_file;

Am I missing something?


That did it Fred. I've never had to do that before. Post it as an answer and I'll upvote it and accept it. – Richard Young

Posting my comment as "the" answer:


Use a full server path (an example):


or a relative one.