PDA

View Full Version : Php help



mami
June 29th, 2005, 15:49
Hi i need help so when somebody uploads something to my website with this php script

http://mami.hoogetech.com/phpuploader.zip

how do i make it so it show the files that have been uploaded :confused4
so they can view them :tongue2:

hottweelz
June 29th, 2005, 22:21
Hi, first of all, thats the zip file for phpuploader.... you have to unzip it... then run the included files.

mami
June 30th, 2005, 00:53
yea i did that uploaded them ,it all worked but now i need some code to show the files
that have been uploaded. so they can view them :p

hottweelz
June 30th, 2005, 08:22
Ok give a link to the actual upload screen so we can test it out, or PM me with it if you like, so I can see how it works.

Polykranopalous
June 30th, 2005, 09:05
just checked out the script, and for your solution its VERY easy.

Open up the UPLOADER.php file and look for the part where it gets successfully uploaded (its like lines 85-92)
Alright now under the line "copy ($picture3, "$ADMIN[directory]/$picture1");"
place this:
$error .= "<img src='$ADMIN[directory]/$picture1'><BR>";
and that is all.

mami
June 30th, 2005, 15:34
Ok give a link to the actual upload screen so we can test it out, or PM me with it if you like, so I can see how it works.

www.mami.hoogetech.com/uploader.php

for the setup.php file

www.mami.hoogetech.com/setup.php

mami
June 30th, 2005, 15:36
just checked out the script, and for your solution its VERY easy.

Open up the UPLOADER.php file and look for the part where it gets successfully uploaded (its like lines 85-92)
Alright now under the line "copy ($picture3, "$ADMIN[directory]/$picture1");"
place this:
$error .= "<img src='$ADMIN[directory]/$picture1'><BR>";
and that is all.

I need it like so it show all the file titles then you can right click on it to save it or get the location so people know where it is :biggrin2:

mami
July 2nd, 2005, 17:06
* Bump *

DarkBlood
July 3rd, 2005, 09:52
mami,

You could resolve this problem with a simple file directory listing script. Go to This URL (http://us3.php.net/manual/en/function.readdir.php) to find a tutorial on how to make a readdir function work.

ryza
July 3rd, 2005, 11:46
Letting users upload into a web accessible folder is a security risk*

DarkBlood
July 3rd, 2005, 14:16
Not unless they cannot see certain files.

This is why,

$handle !== index.php (file_dir_list) && $handle !== conf_global.php (IPB stuff) && $handle !== mysql_driver.php

This goes in as with any other files you dun want to show in the readdir thing. :P

fileupload() can be set the same way I believe.

mami
July 4th, 2005, 00:58
Letting users upload into a web accessible folder is a security risk*

Not really if need to put in a password to upload a file :P
or if you put it in a password protected directory


Not unless they cannot see certain files.

This is why,

$handle !== index.php (file_dir_list) && $handle !== conf_global.php (IPB stuff) && $handle !== mysql_driver.php

This goes in as with any other files you dun want to show in the readdir thing. :P

fileupload() can be set the same way I believe.

Thanks for your help
done now

Could some moderator close this topic please? :tired2: