| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2008-08-07 07:27 UTC] derick@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Mon Nov 03 16:00:02 2025 UTC | 
Description: ------------ i have an error when loading csv widget on my site. -partial widget -navbar not show Error state. Warning: fopen(/path_to/uploads/content.csv) [function.fopen]: failed to open stream: No such file or directory in /mnt/w0500/d41/s13/b02e8f66/www/lnaelite.org/widget/libs/Content.php on line 6 Warning: fgetcsv(): supplied argument is not a valid stream resource in /mnt/w0500/d41/s13/b02e8f66/www/lnaelite.org/widget/libs/Content.php on line 7 Warning: fclose(): supplied argument is not a valid stream resource in /mnt/w0500/d41/s13/b02e8f66/www/lnaelite.org/widget/libs/Content.php on line 18 Reproduce code: --------------- <? function getCsv($parse) { $i = 0; $handle = fopen ($parse,"r"); while($data = fgetcsv ($handle, 1000, ",")) { if ($i == 0) { $key_arr = $data; } reset($key_arr); while(list($index,$name) = each($key_arr)) { $temp_arr[$name] = $data[$index]; } $result[$i] = $temp_arr; $i++; } fclose ($handle); return $result; } Expected result: ---------------- no database required for widget. ftp widget files to writable dir/. (use excel docs. widget appears fully functional. Actual result: -------------- widget functional with basketball stats. roster. images.