I am trying to send mail with attachment after using browse button.
in this process some error shows
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/php_upload/phpLc37tw) is not within the allowed path(s):
thsese are code for my mail file
$filename=$_FILES["strresume"]["name"];
$filetype=$_FILES["strresume"]["type"];
$filesize=$_FILES["strresume"]["size"];
$filetemp=$_FILES["strresume"]["tmp_name"];
$fp = fopen($filetemp, "rb");
$file = fread($fp, $filesize);
$file = chunk_split(base64_encode($filename));
$num = md5(time());
$headers = "From: yourname<youraccount@yourdomain.com>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed; ";
$headers .= "boundary=".$num."\r\n";
$headers .= "--$num\r\n";
// This two steps to help avoid spam
// This two steps to help avoid spam
$headers .= "Message-ID: <".gettimeofday()." TheSystem@".$_SERVER['SERVER_NAME'].">\r\n";
$headers .= "X-Mailer: PHP v".phpversion()."\r\n";
// With message
$headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "".$message."\n";
$headers .= "--".$num."\n";
// Attachment headers
$headers .= "Content-Type:".$filetype." ";
$headers .= "name=\"".$filename."\"r\n";
$headers .= "Content-Transfer-Encoding: base64\r\n";
$headers .= "Content-Disposition: attachment; ";
$headers .= "filename=\"".$strresume_name."\"\r\n\n";
$headers .= "".$file."\r\n";
// $headers .= "--".$num."--";
// SEND MAIL
mail($to, $subject, $message, $headers);
my browse button is
<input type="file" name="strresume" style="height:25px;" />
this is the form pagehttp://migrantaustralia.com/applyonline.html