read_file, file_exists return nothing |
[eluser]Unknown[/eluser]
so I was trying to use read_file to check if a file exist ... but it returned nothing rather the file existed or not ... so I decided to just use php's file_exists ... it still returns nothing ... can someone help? I am trying to see if an image exist ... if it does show it ... else show some other code. This is what I have: Code: <?
[eluser]richthegeek[/eluser]
Try trim()ing the session data. if you are still having trouble try using scandir to see what files actually exist in that directory from a PHP-visible perspective
[eluser]Sumon[/eluser]
From php manual Code: <?php http://completebeautylist.com/). So would you please give a try as Code: <?
[eluser]attos[/eluser]
Did you mean readfile() instead of read_file()? I had the same problem with readfile() returning an empty file (zero length). I solved it using: Code: $fp = fopen($path, 'rb'); readfile() worked in my development environment (WinXP + xampp), but failed under FreeBSD and Apache. |
Welcome Guest, Not a member yet? Register Sign In |