Re: Re: writing source code to file
| From: | John Holmes | Date: | Wed, 18 Aug 2004 03:55:50 +0000 |
| Subject: | Re: Re: writing source code to file | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194113@lists.php.net to get a copy of this message | ||
Hannes Magnusson wrote:
On Tue, 17 Aug 2004 19:34:18 -0700 holmes072000@charter.net (John Holmes) wrote:Sorry, I misunderstood. No, that won't work. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.comHannes Magnusson wrote:You really think that this works? getting contents from the file currently running? I not only doubt it, I *know* it wont work. Try this out: <?php $url = "http://" .$_SERVER[ "HTTP_HOST" ].$_SERVER[ "REQUEST_URI" ]; $string = file_get_contents ( $url ); ?> This really what you are proposing? Works fine as long as you run file_get_contents() on diffrent file.There are no problems with using a method like this.file_get_contents("http://www.yoursite.com/script.php");I belive that this method will hang for ever since the script doesnt exit until file_get_contents() has got the complete results.. ...and the complete results wont be ready until file_get_contents() returns.