【发布时间】:2015-05-17 11:09:38
【问题描述】:
文件根目录是/var/www,我想把网页下载到/var/www/php.html
<?php
$url = "http://php.net";
$html_content = file_get_contents($url);
$fp = fopen("php.html","a");
fwrite($fp,$html_content);
fclose($fp);
echo $html_content;
?>
我可以在 Firefox 中获取网页,但是我的 php.html 文件在哪里?
【问题讨论】:
-
你有预付款吗?
标签: php linux file file-get-contents document-root