is_readable(http://.... text file) says not, but I can in browser
| From: | John Allsopp | Date: | Sun, 28 Dec 2008 18:02:39 +0000 |
| Subject: | is_readable(http://.... text file) says not, but I can in browser | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-285156@lists.php.net to get a copy of this message | ||
Hi
I'm sure this is simple for yous all but I'm not sure I know the answer.
$myFileLast = "http://www.myDomain.com/text.txt"; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose($fh); echo ("The dataLast: ".$theDataLast."<br>\n"); } else { echo ("Last fix file unavailable: $myFileLast<br>\n"); }returns Last fix file unavailable even for a file that my browser can read. All I want to do is skip over files This could be a very simple error, I'd appreciate a pointer. Is it permissions being different for PHP versus the browser or something? PHP is running on a different server. Cheers J