working with uploaded tmp images
Moderator: General Moderators
working with uploaded tmp images
Hi, I have almost completed my first registration form and now i only need to overcome this issue with images in the tmp folder prior to output... I have my registration process as index.php(the registration form) => process.php (validation) then if avatar was uploaded then it will be sent to crop.php otherwise confirmed.php.... so yh thats the brief overview... in my crop.php i have a js cropping gui tool that i want the user to use before i store the file into the users folder.. unfortuantly i cant seem to have the image displayed even though the image source (img src="......") displays the tmp name and ive even tried with adding an extension to the tmp name eg. <img src="< ? php $tmp . '.jpg' ? > without success which kinda makes sense coz html isnt able to directly access the tmp folder (i guess)... so any help will greatly be appreciated... thanks
Re: working with uploaded tmp images
chage the upload temp directory to one that the webserver does have access to. the php.ini has the "upload_tmp_dir" that may be of interest to you.
Re: working with uploaded tmp images
kk i had set the ini tmp to my register/tmp folder and it had worked as i echo the $_FILES['avatar'] and showed the correct path yet it still fails to show
my img source now has
and shows the correct address under source...
could this be a problem due to tmp files being deleted after the script has finished running? if so how could i over come this?
my img source now has
Code: Select all
<img src="<?php echo 'tmp/' . basename($src_img) . '.jpg' ?>" id="cropbox" />could this be a problem due to tmp files being deleted after the script has finished running? if so how could i over come this?