Re: file_get_contents

From: Date: Fri, 17 Nov 2006 14:14:54 +0000
Subject: Re: file_get_contents
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-244805@lists.php.net to get a copy of this message
Stut wrote: > Tom Chubb wrote: >> The host support team told me that: >> Our servers do not allows a HTTP connection onto itself. This is a >> security precaution to stop recursive code. morons.... <?php function teachTheIdiotSysAdmin() { echo 'look no self referencing HTTP request<br />'; teachTheIdiotSysAdmin(); } ?> >> You can try to reference >> the code by path rather than HTTP >> ...which works fine! > > Won't something like this work... > > ob_start(); > // If needed you can set up vars used by player.php here > include('player.php'); > $code = ob_get_contents(); > ob_end_clean(); > > That will capture any output from player.php and stuff it into $code. > Much nicer than anything else suggested so far. yes indeed - actually this is the best solution - no eval, no extra request. good catch Stut > > -Stut >

« previous php.general (#244805) next »