Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php upload file, gets everything but the file contents

Status
Not open for further replies.

MBall2003

Programmer
May 30, 2003
61
0
0
US
i can get the filename, filesize and filetype but i cant get the file contents this is my code

$handle = fopen ($_FILES['docData']['tmp_name'], "r");
$data = addslashes( fread ($handle, filesize ($_FILES['docData']['tmp_name'])));
$docType = $_FILES['docData']['type'];
$docName = $_FILES['docData']['name'];
$docSize = $_FILES['docData']['size'];
fclose ($handle);

i echo out all the info and this is what shows up

data []
type [application/octet-stream]
name [news_tvChooseForm.php]
size = [1585]


what am i doing wrong that i cannot get the data??

any help would be greatly appreciated thanks

mball
 
can i have the form tag of the page that u have submitted? does it have an enctype attribute?

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top