Reputation: 1
<?php
if(file_exists(dirname(__FILE__).'\<<<<<<<'))
echo "YES";
else
echo "No";
?>
My server is Windows 2003
When I test on my server , the response is YES.
But we all know the file name : "<<<<<<<" is invalid ,SO the file named "<<<<<<<" does not exist
So what is the reason ?
when i echo dirname(FILE).'\<<<<<<<';
The output is C:\website\<<<<<<<
Upvotes: 0
Views: 194
Reputation: 121
i think you should check your server file manager manual or windows server guidelines (forum).. because in any Windows XP/7/8 try to make folder with name "con" or "LPT1",this will not allow to generate...so its called "EASTER Egg" problem... and in your case i think this problem is something like easter egg.
Upvotes: 2
Reputation: 397
are you sure your file name is Correct "<<<<<<<"
if yes then try to echo the whole path first
- $filename = dirname(FILE) . '\<<<<<<<';
echo $filename; // see is it returning you the correct path
Upvotes: 0