|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-05-05 06:57 UTC] judas dot iscariote at gmail dot com
  [2006-05-05 08:05 UTC] tony2001@php.net
  [2006-05-05 19:38 UTC] ryanericw at gmail dot com
  [2006-05-06 09:09 UTC] tony2001@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 13:00:01 2025 UTC | 
Description: ------------ is_file and file_exists() bugged? Reproduce code: --------------- I am kind of a newbie at coding PHP, but I recently inserted the code //if(is_file("$main_link_files/$file")) if(file_exists("http://www.rfiles.com/rp/downloads/files/remo_test.zip")) { header("Location: $main_link_files/$file"); } else { include('inc/site_header.inc'); echo "Sorry, the file you have requested is either invalid or missing.<br> Please try again later or contact an administrator.<br>$main_link_files/$file"; } and all I end up being returned is false, leading me to the "Sorry, etc". I've tried, is_file() and file_exists(), and have ended up with the same result. Now, I'm not sure if this is a problem, but I am actually hosting the file off of my webspace, which is on another webserver, apart from the script, which is hosted on my server machine. I troubleshooted this for hours, and still come up with false, but yet the direct link works from the header if I remove the checks. I even made sure all the permissions are set to 777 in the CHMod file properties. Any help would be very appreciated. Thank You. Expected result: ---------------- True. Actual result: -------------- False.