can not create temporary image file
here code :
if (move_uploaded_file($_FILES['image">['tmp_name">, $filepath . $imagename1)) {
echo "Image Uploaded Successfully !!!";
} else {
echo "Could not move the file.";
}
....
i tried code to ==> echo $_FILES['image">['tmp_name"> <==
it gives like output ==> /tmp/phpSCFtf3 <==
it doesnot have file name and dir name also.
i set permissions for both tmp and storing dir images also 0777 permissions.
anyone help me to get temporary file name for uploaded imagefile.
Thanks in Advance....
-
What part of your cPanel are you having an issue with exactly? 0 -
Hello :) As InfoPro suggested, it looks like you might have an issue with your PHP scripting, as opposed to an issue with the cPanel/WHM software. You may get more user feedback on this type of question on a forum dedicated to discussions of PHP development or website development in general. Thank you. 0 -
i cant realize the correct part. but i gave all permissions to folders(both tmp and images). it shows only dir. not a filename.. 0 -
[quote="Kumar m, post: 1664542">i cant realize the correct part. but i gave all permissions to folders(both tmp and images). it shows only dir. not a filename..
Please ensure you upload an index file to the public_html directory so it loads in lieu of the directory index. Note that files should typically have 0644 permissions while directories beneath public_html should have 0755 permissions. Thank you.0 -
cPanelMichael i tried this. but it gives ==> /tmp/phpnphfSE <== 0 -
The code move_uploaded_file($_FILES['image">['tmp_name">, $filepath . $imagename1)
is trying to move a file with the name of '/tmp/phpSCFtf3' to whatever '$filepath . $imagename1' is declared as. The filename you are trying to copy is $_FILES['image">['tmp_name">. The echoed value is '/tmp/phpnphfSE' and is not a file name. The problem lies where $_FILES['image">['tmp_name"> is declared in your script.0 -
Audiopro, i used my coding in localhost(wampserver). ir's working fine. but in cpanel only like this output. 0 -
In your example, the variable $_FILES['image">['tmp_name"> is not being assigned to the name of an image. If the same code has worked previously then I would suggest that your PHP script is not looking in the correct place for your images. How are you running a PHP script in CPanel? 0 -
i using the PHP code in cpanel like upload.php. i that file have coding to do image filename, size, format and move the file via ajax form... 0 -
I am assuming the PHP file is running on the server totally independent of cPanel, is this correct? What does the .PHP script do? - Loads an image, and saves a copy of it onto the server? Are you using GD library? 0 -
am using GD library. my problem resolved thanks to all replies. 0
Please sign in to leave a comment.
Comments
11 comments