undefined function eror
Posted: Sun Jan 21, 2007 8:07 am
I'm messing around with csv file output. I ran an example I found on php.net
But I get this error message:
Fatal error: Call to undefined function: fputcsv() in /home/content/f/l/h/flhome/html/promediadesign/fputcsv.php on line 12
Is it because my hosting company doesn't support it or is it a problem with the code?
Thanks.
Code: Select all
<?php
$list = array (
'aaa,bbb,ccc,dddd',
'123,456,789',
'"aaa","bbb"'
);
$fp = fopen('file.csv', 'w');
foreach ($list as $line) {
fputcsv($fp, split(',', $line));
}
fclose($fp);
?>Fatal error: Call to undefined function: fputcsv() in /home/content/f/l/h/flhome/html/promediadesign/fputcsv.php on line 12
Is it because my hosting company doesn't support it or is it a problem with the code?
Thanks.