I am having a problem with my fread line of my code. I have 2 pages. One is for the form and the other is for the message sent page. The form submits fine but when I attach a file and send it with the form, on the messege sent page I get this error:
Warning: fread(): Length parameter must be greater than 0. in /home/virtual/site205/fst/var/www/html/mysite_messageSent.php on line 100
My line 100 in my php code is this:
php:
--------------------------------------------------------------------------------
$data = fread($file,filesize($tmp_name));
?>
--------------------------------------------------------------------------------
Any ideas?
fread problem
Moderator: General Moderators
Found problem
I was testing a text file attachment with nothing, so it showed as 0 . Thanks for the help.