PDA

View Full Version : Uploader Script Help! [Rep]



Jahova
03-05-2008, 03:40 PM
Well, I have been looking through and adding stuff to various loader php scripts and I am stuck on this one part.


It uploads the file to the destination [/files] but I want the image / file to show afterwards. How would I do this..?


Uploader.Php;

<?php
error_reporting(0);
$filepath = getcwd()."/files/";
if(!file_exists($filepath)) {
mkdir($filepath,0777);
}
chmod($filepath,0777);
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $filepath.$_FILES['Filedata']['name'])){
chmod($filepath.$_FILES['Filedata']['name'], 0777);
}
?>

Config;

<fileFilter value="Word,*.doc;*.rtf,Excel,*.xls;*.csv,PDF,*.pdf,Image ,*.png;*.gif;*.tiff;*.bmp;*.jpg;*.jpeg" />
<redirectURL value="/files/$filepath.$_FILES['Filedata']['name']" />
<redirectTarget value="_self" />



+REP to all help!
Or.. If you can suggest another decent uploader script that will show the link / the image of the file then post here!!

Robbie
03-05-2008, 03:48 PM
echo $filepath.$_FILES['Filedata']['name'];

Dentafrice
03-05-2008, 03:51 PM
You do know that someone could just upload a malicious PHP file to your server and overtake anything?

Jahova
03-05-2008, 04:25 PM
Dear, anyone got a decent upload script that I can use then?
+ REP to people with idea's.

Dentafrice
03-05-2008, 04:38 PM
Try this tutorial: http://php.about.com/od/advancedphp/ss/php_file_upload.htm

:)

Jahova
03-05-2008, 05:35 PM
Thanks, Repped you both.

Protege
03-05-2008, 06:58 PM
You do know that someone could just upload a malicious PHP file to your server and overtake anything?
Your not suppose to tell him that ;/

About do some good tutorials and explain things pretty well.

Hypertext
03-05-2008, 07:12 PM
TomSpit remind me why you used ; after you gave the file a title. and why is it .Php

Sorry fi it seems pedantic, it's one of my pet peeves. :rolleyes:

Dentafrice
03-05-2008, 07:31 PM
Your not suppose to tell him that ;/

About do some good tutorials and explain things pretty well.

He repped me and thought it was good advice, so don't tell me what I am supposed to do or not.

Why don't you try to help him then instead of rolling.


TomSpit remind me why you used ; after you gave the file a title. and why is it .Php

Sorry fi it seems pedantic, it's one of my pet peeves. :rolleyes:

No one cares about your pet peeves. It works.

Protege
03-05-2008, 07:36 PM
Aw I feel for you being all defensive.

Dentafrice
03-05-2008, 07:38 PM
No it is just stupid for someone not to tell them about a huge security hole.

If he deployed that on a live site, thats it.. so get the stick out of your *** and quit acting like you own this section and quit acting like you know what you are talking about.

Edited by brandon (Forum Moderator): Please do not be rude

Protege
03-05-2008, 08:19 PM
Get over yourself man, I didn't even start an argument with you nor do I need to be honest. Mate you fail, your site fails and your prepubescent face fails; ** that your 18. *Removed*

Edited by brandon (Forum Moderator): Please do not avoid the filter using abbreviations

Dentafrice
03-05-2008, 08:26 PM
Get over yourself man, I didn't even start an argument with you nor do I need to be honest. Mate you fail, your site fails and your prepubescent face fails; ** that your 18. REMOVED

What really proves to me you are sad, is that you are "trying" to insult someone over an internet forum. Quite funny.

Oh, you didn't try to start an argument, ha:


Your not suppose to tell him that ;/

About do some good tutorials and explain things pretty well.You're telling me what I should do and shouldn't do, like you are a genius.

I have not once seen a site from you that even resembles success, so quit trying to insult me, rile me up, when your acting like a 13 year old "whiner."

I'll "get over myself" once you do, and after you quit telling people what they should and shouldn't do.

Edited by brandon (Forum Moderator): Please do not be rude towards other users.

Hypertext
03-05-2008, 08:36 PM
Calm down. And Dentafrice, don't start an argument with me. :rolleyes:

Dentafrice
03-05-2008, 08:38 PM
LOL, I just don't really think he cares about your pet peeves, it is that simple..?

Thats like saying.. I don't like people using <b> instead of <strong>, I really don't think many people care. He is asking for help with his script, not your pet peeves nor the way he should do things.

Protege
03-05-2008, 09:23 PM
I was going to write something really bad but I came lost my train of thoughts so basically I'm going to just laugh at you as its the best thing I can do for someone like you. Here was what i was writing till i got distracted...

removed actually

Anyway, good luck Celeb good luck man.

Want to hide these adverts? Register an account for free!