• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

php can't find files

Interesting problem here.

Permissions seem right, but no files on this server can be addressed by PHP.

Here is a simple script that has the file in question in the same directory as the script.

The script returns false.  OS is linux..

ini_set ("display_errors", "1");

$loc = "/home/mydir/public_html/mydir-contents.tar ";
if (file_exists($loc)){
      echo "found it";
      echo "false";

//-rwxrwxrwx 1 mydir users 1285632 Aug 21 13:45 mydir-contents.tar

1 Solution
Seth SimmonsSr. Systems AdministratorCommented:
remove the space between the file name and closing quote for the loc variable
lexshineAuthor Commented:
wow, that was a terrible oversight/typo.  thanks for pointing it out!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now