请耐心等待我(我只是学习如何使用php)。我无法弄清楚我的tidy
错误是否与错误的wget
命令或其本身有关。我以为我的wget命令是抓取远程文件并将其放入我服务器上的$ link目录中...但似乎有些不对劲。
我试过
"..." . $htmlDir . "/*";
错误:
错误:无法打开" app / HtmlPages / arl.server.com -2015_11_19_15:36:09 / arl.server.com / index.php / art"
wget.php:
$ip = $argv[1];
// Get the current time for the filename
$currentTime = date( 'Y_m_d_H:i:s' );
$link = "app/HtmlPages/$ip" ."-". "$currentTime";
$htmlDir = "$link/$ip/index.php/art";
// Use wget to download aaron.htm webpage
$wget_cmd = "wget -P $link/ http://$ip/index.php/art/aaron.htm";
exec ( $wget_cmd );
// Clean up the HTML for every page.
$tidy_cmd = "tidy -config tidy_config.txt -i -m $htmlDir/*";
exec ( $tidy_cmd );
//$tidy_config = file_get_contents( 'tidy_config.txt' );
//$tidy = new tidy();
//$tidy->parseFile( '$htmlDir/*.htm', $tidy_config );
...