another file uploading problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

another file uploading problem

Post by ben_albrechts »

Hi,

I need a form on my website allowing people to upload there own images (which should be processed so that the images are saved on the server AND are emailed to me).
I am new to php , but from what i understand u need to know the folder where the images are temporarily saved? B-one,the server where i bought my domain and where my site is stored, do have php enabled,but the folder is hidden and i dont know how to find it. People at B-one are being no help whatsoever saying they dont even know if its possible to do that with php.

Anyone know what i should do?
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

Among other things, phpinfo() will give you the name of "upload_tmp_dir".
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

it says : no value
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

Indeed. And what is the value of "file_uploads"? If it's "Off", you'll have to find another way.
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

no says file_uploads is on.
God it's all confusing me
Jeroen Oosterlaar
Forum Commoner
Posts: 37
Joined: Sun Nov 06, 2005 4:12 pm

Post by Jeroen Oosterlaar »

Are you sure you need to define the path to the uploaded tempfile? As far as I know the path is already included in the the $_FILES["_somename_"]["tmp_file"] property.
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

I'd always assumed that $_FILES["_somename_"]["tmp_file"] got the path info from whatever was set in php.ini and would revert to a default value if none was specified.

upload_tmp_dir

The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.
I suppose just give it a try with the system default and see what happens?
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

Thank you to everyone who's helped. It's solved now.
I dont know why I got so confused , i used system defaults and it works without a problem.
So thanks
Post Reply