php代码无法在iis上运行

时间:2013-07-01 07:51:52

标签: php iis-7

我已经通过web平台安装程序在我的网络服务器(iis)上安装了php。我正在尝试在iis上执行php代码。这是我的PHP代码,除了显示空白页面之外没有在iis上运行。当我使用phpinfo();时,它工作正常,但此代码无效。

<?php
//include("..\acl.php");
set_time_limit(500);
$url = 'http://appsrv01.shakarganj.com.pk:7778/reports/rwservlet?reptest&report=cashflow';
$pdf = 'cashflow.pdf';
$pdfbak = 'bak/'.$pdf;

if (filesize($pdf) > 10000)
{
copy($pdf,$pdfbak);
}

if ((int)time() > filemtime($pdf) + 100)
{
file_put_contents($pdf, file_get_contents($url));
}
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/pdf');

if (filesize($pdf) > 10000)
{
readfile($pdf);
}
else
{
readfile($pdfbak);
}

?>

请任何人告诉我code.Plz帮助

可能存在的问题

0 个答案:

没有答案