执行以下代码块时:
foreach($eventfiles as $eventfile)
{
if($eventfile['filename'])
{
$file = $eventfile['filepath'];
// Open File
if( !($fp = fopen($file, "r")))
{
echo '<br>CAN NOT READ FILE.';
exit;
}
// Read data from the file into $data
$data = "";
while (!feof($fp)) $data .= fread($fp,1024);
query("update event_rtab set html = '".escape($data)."' where id = {$eventfile[id]}");
}
if($eventfile['eventType']=='email')
{
query("INSERT INTO event_email_rtab (event_id,subject) values ($eventfile[id],'".escape($eventfile[email_subject])."')");
}
}
脚本失败并出现以下错误:
fopen(test.html)[function.fopen]:无法打开流:达到重定向限制,在第 843 行的 /data/www/example.com/public/test.php 中中止
是什么导致了这个错误,我该如何纠正它?