Page 1 of 1

no such fle error....

Posted: Thu Mar 09, 2006 9:36 pm
by hari.rao
guys, i have this error and i dont know wat should i do. im kinda new to php. pls help.

error msg.
Warning: filesize(): Stat failed for D:\projects\Kodak eportsKODAK_ALL_JOBS_REPAIR-20060310.xls (errno=2 - No such file or directory) in C:\Inetpub\wwwroot\webreport\kodak_test\include\function.php on line 74


line 74.
function add_file($data, $name) {
$fp = fopen($filename,"wb");
$data = fread($fp,filesize($data));------>error area.
fclose($fp);


my beloved pro's....pls help. urgent
thanks

Posted: Fri Mar 10, 2006 12:50 am
by tmarion
It is as it states (no such file or directory). I would suggest checking that this file actually exists. Maybe you are missing a \ in the path name or something similar.

http://www.marionweb.com
-- Business solutions through technology[/url]

Posted: Fri Mar 10, 2006 8:09 am
by ambivalent
filesize() expects a filename as an argument. Is $data a filename?