2013-12-15 61 views

回答

0

看來,是的,我們必須FCLOSE給定流的工作是手工完成後:

$filename = '/tmp/' . uniqid(); 
$h = fopen($url, 'r'); 
if (!file_put_contents($filename, $h)) { 
    throw new Exception('Xml download failed'); 
} 

var_dump($h);   // resource(5) of type (stream) 
var_dump(fclose($h)); // bool(true) 
var_dump($h);   // resource(5) of type (Unknown) 
相關問題