Jump to content

file_get_contents() No such file or directory


ttocskcaj

Recommended Posts

file_get_contents() has suddenly stopped working for me. I keep getting this error:

Warning: file_get_contents(/Users/ttocskcaj/MineCMS/public/js/jquery.js ) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /Users/ttocskcaj/MineCMS/controllers/m.controller.php on line 44

 

The file(s) definitely exist, I can use nano to open them, and permissions are 777 on all the files. The lampp error log has nothing. Not even a No such file or directory error as you'd expect.

 

Any ideas what's going on?

Ok problem solved.

The filename (which is read from a txt file) had a "\n" linebreak at the end of it that wasn't showing in the error messages!

Just did a str_replace for \n and \r and it's working fine :D

That's probably why you should always post your code...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.