Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2006, 04:23 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default Warning: fread(): Length parameter must be greater

Friends,
I try to read a empty file, i'm getting following error, how can i fix it
Warning: fread(): Length parameter must be greater than 0. in /home/elgin/public_html/sendmail.php on line 113

Line 113
--------
$data = fread($file,filesize($fileatt));

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
__________________
surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com
 
Old September 20th, 2006, 05:41 AM
Registered User
 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have variable ($fileatt) which is null. You can read this without the filesize parametr.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Greater than, less than jroxit Classic ASP Basics 3 February 1st, 2008 06:38 PM
Uplad txt field of size greater than 12 mb rapraj PHP Databases 3 October 28th, 2007 09:36 AM
Upload Files of Greater Size (>5Mb) saravananedu ASP.NET 1.0 and 1.1 Basics 1 May 4th, 2005 12:07 AM
Select Where Greater Than Count [email protected] SQL Language 3 April 29th, 2004 05:14 AM
Greater than KennethMungwira VS.NET 2002/2003 0 November 4th, 2003 06:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.