有点奇怪哈.
不过还要检查一下, web有没有权限运行wget, web有没有权限写pic这个目录.用popen打开,然后查看返回的错误信息.
执行命令行命令,最好用以下的这种方式,可以给你足够的错误信息.$cmd = `wget -O pic/001.gif http://localhost/001.gif`;
if ($result = popen($cmd, "r"))
{
while (!feof($result))
{
$line = fgets($result, 1024);
$strContent .= $line;
//if ($pre) $line = replaceEntities($line, $this->repConfig);
}
pclose($result);
}
不过还要检查一下, web有没有权限运行wget, web有没有权限写pic这个目录.用popen打开,然后查看返回的错误信息.
执行命令行命令,最好用以下的这种方式,可以给你足够的错误信息.$cmd = `wget -O pic/001.gif http://localhost/001.gif`;
if ($result = popen($cmd, "r"))
{
while (!feof($result))
{
$line = fgets($result, 1024);
$strContent .= $line;
//if ($pre) $line = replaceEntities($line, $this->repConfig);
}
pclose($result);
}
$result = `wget -O pic/001.gif http://localhost/001.gif`;
exec($result, $output, $returnVar);
print_r($output);
print_r($returnVar);
?>