note 34763 added to function.file

From: Date: Wed, 06 Aug 2003 00:22:41 +0000
Subject: note 34763 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-53470@lists.php.net to get a copy of this message
I have noticed that file() has problems with the following example: <?php $webpage = "page1.html"; $content = implode ( "", file("http://blabla.net/pagesource.php?page=".$webpage) ); ?> The next example will be ok, but it is not a good solution: <?php $content = implode ( "", file("http://blabla.net/pagesource.php?page=page1.html") ); ?> Ok, I have figured out a "trick": <?php $webpage = "page1.html"; $tmp_url = "http://blabla.net/pagesource.php?page="; $url = $tmp_url.$webpage; $content = implode ( "", file("$url) ); ?> Works fine, but strange, ain´t it ? :) ---- Manual Page -- http://www.php.net/manual/en/function.file.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34763 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34763&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34763&report=yes

« previous php.notes (#53470) next »