Re: Local variable protection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I want to use the function fputcsv, but have the results in a local variable, not a file.

So I thought I could use php://temp
Like in this code sample:

$fp = fopen( "php://temp", 'r+' );
if ( fputcsv( $fp, $data, ",", "'" ) === FALSE )
{
  // error
}
else
{
  rewind( $fp );
  $csvString = stream_get_contents( $fp );
}

This works fine on my local server. What I don't know, if if this will work on another server (with version 5.3 or higher). In the documentation (wrappers.php.php), it is stated that it is restricted by allow_url_include, but what does that mean? The explanation on filesystem.configuration.html is sufficiently vague to leave me clueless.

Can anybody enlighten me? Is this code snippet supposed to work on all servers? Even where allow_url_include is false or not set?

Thanks,
Greetings,

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux