no such fle error....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hari.rao
Forum Newbie
Posts: 11
Joined: Mon Mar 06, 2006 7:07 pm
Location: Malaysia

no such fle error....

Post 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
tmarion
Forum Newbie
Posts: 5
Joined: Sun Feb 26, 2006 3:23 am
Contact:

Post 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]
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

filesize() expects a filename as an argument. Is $data a filename?
Post Reply