2014-01-06 61 views
-4

我知道這是一個基本問題。我爲我們的客戶網站創建了一個職業形式,一切工作正常,但我不知道如何將簡歷從php上傳到服務器。 需要解決。什麼應該是上傳履歷到服務器的代碼php

<?php 
$name = $_POST['name']; 
$fatherName = $_POST['father-name']; 
$email = $_POST['email']; 
$mobile = $_POST['mobile']; 
$postApplying = $_POST['post-applying']; 
$comments = $_POST['comments']; 
$dateOfBirth = $_POST['date-of-birth']; 
$qualification = $_POST['qualification']; 
$workExperience = $_POST['work-experience']; 
$resume = $_POST['resume']; 
$yourself = $_POST['yourself']; 
$subject = "Career Form of Revive Enterprises"; 
$formData = "Candidate Name: $name \n\n Father Name: $company \n\n Email : $email \n\n Mobile : $mobile \n\n Post Applying For : $posApplying \n\n Comments : $comments \n\n Date Of Birth : $dateOfBirth \n\n Qualification : @qualification \n\n Work Experience : $workExperience \n\n Resume : $resume \n\n Candidate Details : $yourself \n\n Subject :  $subject"; 
$recipient = "[email protected], $email"; 
$mailHeader = "From: $email \r\n"; 
mail($recipient, $subject, $formData, $mailHeader, $message) or die("Error!"); 
echo "Thank You"; 
?> 
+1

潛在重複:http://stackoverflow.com/questions/3509333/php-how-to-upload-save-files-with-desired-name –

回答

0

試試這個:

在這裏,你需要使用PHP在您的服務器上傳簡歷。

參見本:http://in1.php.net/move_uploaded_file

或嘗試這個代碼

$info = pathinfo($_FILES['userFile']['name']); 
$ext = $info['extension']; // get the extension of the file 
$newname = "newname.".$ext; 

$target = 'images/'.$newname; 
move_uploaded_file($_FILES['userFile']['tmp_name'], $target); 

謝謝!

相關問題