If your getting tmp_name value empty in word press php image upload ,it is because of temp directory path issues you can solve by using following steps.
1) By using FTP or hosting create a php.ini file in root folder(don’t create if that file already their means.)
2) Add below line in that php.ini file
i) upload_tmp_dir= /home/username/public_html/temp/ ( /home/username/public_html= root path)
ii) Create a folder temp( in root ditectory and give full permission)
3) Now you can use same PHP upload script to upload your image
if (move_uploaded_file($_FILES[“fileToUpload”][“tmp_name”], $target_file)) {
echo “The file “. basename( $_FILES[“fileToUpload”][“name”]). ” has been uploaded.”;
} else {
echo “Sorry, there was an error uploading your file.”;
}
Cheers 🙂
Est d’accord, la piГЁce trГЁs utile
Bemerkenswert, die sehr lustige Meinung
Und Sie versuchten selbst so?
Geben Sie wir werden zu diesem Thema reden.
Excuse, I have thought and have removed the idea