Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的代码看起来像这样.. o/p 是一个 csv 文件,在一个单元格中有 4 个值,依此类推,仅在第一列中
请提供此代码的更好版本。尽快
foreach ($xml->xyz as $xyz) { $f = fopen('blahblahblah.csv', 'a') or die("can't open file"); fputcsv($f, get_object_vars($lis),';','"');
$f = fopen('blahblahblah.csv', 'a') or die("can't open file"); foreach ($xml->xyz as $xyz) fputcsv($f, get_object_vars($lis),';','"'); fclose($f);
像这样应该没问题。