ここで問題が発生しました。fgetcsv関数を使用してcsvファイルを読み取り、それをループしてxmlファイルに書き込みます...それほど大きなデータでスクリプトを使用していない場合、すべてが完全に機能し、xmlファイルを書き込みます.. ..しかし、巨大なcsvで使用すると、xmlの書き込みが完了せず、閉じられていないトークンになってしまいます
if (($handle = fopen("C:\\xampp\htdocs\yii\branch\seo_tagsdev.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 10000000, ",")) !== FALSE) {
$num = count($data);
// echo "<p> $num fields in line $row: <br /></p>\n";
$row++;
for ($c=0; $c < $num; $c++)
{
$url = $doc->createElement('url');
$root->appendChild($url);
$loc = $doc->createElement('loc',htmlentities($data[$c]));
$url->appendChild($loc);
$lastmod = $doc->createElement('lastmod',date('Y-m-d'));
$url->appendChild($lastmod);
$freq = $doc->createElement('changefreq','daily');
$url->appendChild($freq);
$priority = $doc->createElement('priority',0.9);
$url->appendChild($priority);
// echo $data[$c] . "<br />\n";
}
$doc->save("C:\\xampp\htdocs\yii\branch\seo_tagsdev.xml");
}
fgetcsv の長さパラメータを調整しましたが、まったく機能しません