...

View Full Version : (fwrite or fputcsv) export to windows directory



mathceleb
05-02-2011, 04:07 PM
I am trying to write a csv file to a windows7 directory.

C:\Users\mathceleb\Desktop\CUI05_02_09_01.csv


$handle = fopen($output_file_name, 'w+');

This is what comes out as my $output_file_name parameter. I also checked Microsoft Excel and the directory is listed exactly like this as well if I open the file.

This is not working. However, when I remove the output path portion and just have the filename, the file writes and exports correctly.

I checked Google and did not find much. Any thoughts?

Fou-Lu
05-02-2011, 04:15 PM
I would doubt its the same file. Assuming you are using PHP through apache, its highly improbable that the path you have is published as a web directory.
Enable your error reporting, I'd be betting on a permissions error on this one.

Fou-Lu
05-02-2011, 04:48 PM
Older post responded to, refer to http://www.codingforums.com/showthread.php?t=224003



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum