Issue
I figured this would be an issue eventually and I'm a complete linux noob. My folder structure is like so:
var
+www
++AutoVerify3
+++ajax
+++php
+++results
++++index.php <--The file generating the error
+++users
++++jerred
+++++uploads
++++++combined.xml <--The file I'm trying to open
So from the index.php file above, I'm trying to open the combined.xml and I keep getting this error:
Warning: file_get_contents(AutoVerify3/users/jerred/uploads/Combined.xml): failed to open stream: No such file or directory in /var/www/AutoVerify3/results/index.php
Here is the php code:
$xmlFile = substr($_SERVER['PHP_SELF'],1,strpos($_SERVER['PHP_SELF'],"/",1)).'users'.DIRECTORY_SEPARATOR.''.$_SESSION['myusername'].DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.$_POST['batchFile'];
$xml = file_get_contents($xmlFile);
I've tried several different path combinations but my linux knowledge is lacking.
Solution
At risk of being too obvious, the file is combined.xml (lowercase) but you're including Combined.xml (capitalised). Sanity check it, and confirm please? :)
Answered By - Joe
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.