note 59475 added to features.file-upload

From: Date: Thu, 08 Dec 2005 01:42:30 +0000
Subject: note 59475 added to features.file-upload
Groups: php.notes 
Request: Send a blank email to php-notes+get-99720@lists.php.net to get a copy of this message
I was hoping that someone could help me a great deal. Everytime I put $_FILES or $HTTP_POST_FILES into my script, it does not execute. My website goes blank. Here is the piece of script i'm using(cut down a bit): function add_disclosure($propnum,$HTTP_POST_VARS,$HTTP_POST_FILES); $MAX_FILE_SIZE = $HTTP_POST_VARS["MAX_FILE_SIZE"]; $verify = $HTTP_POST_VARS["verify"]; $uploadedfile = $HTTP_POST_VARS["uploadedfile"]; if ($verify == "1_verified") { $dis_dir = "/directory/"; $dis_file = $dis_dir . basename($HTTP_POST_FILES["uploadedfile"]["name"]); if (move_uploaded_file($HTTP_POST_FILES["uploadedfile"]["tmp_name"], $dis_file)) { $query = "INSERT INTO tbl_name WHERE id = '$propnum' SET disclosure = '$dis_file'"; $result = mysql_query($query); if (!$result) { $this->print_error('add_disclosure',$query,mysql_error()); } $this->tag['message'] = "Property Disclosure Sucessfully Uploaded."; } else { $this->tag['message'] = "Disclosure Failed to Upload."; } return $this->tag; } } Anyone have any idea why it would do such a thing.. I don't even have to execute the function. Is my syntax wrong? ---- Manual Page -- http://www.php.net/manual/en/features.file-upload.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59475 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59475&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59475&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#99720) next »