This is a discussion on "Upload redirection" within the PHP Forum section. This forum, and the thread "Upload redirection are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Upload redirection
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Upload redirection
Hi,
Basically I am using a very basic upload script, so that a friend can upload to my server. I have protected the script by a simple .htaccess file. The code I am using is as follow: - Number of upload holders
Edit :- Sorry I just noticed this is in the wrong forum Thanks in advance, Ross
Last Blog Entry: Blog Noughts and Crosses (Nov 14th, 2007)
|
|
|
|
#2
|
||||
|
||||
|
Re: Upload redirection
Moved to the PHP forum for you. I'm a little confused. What do you mean by "redirecting the uploaded file to another file?" Like overwriting?
|
|
#3
|
|||
|
|||
|
Re: Upload redirection
When you first upload a file using php, it is automatically stored in a temp directory within your directory structure.
However, it cant really be used form this location, so it is normal to "move" the file to a permanent storage location, and in some cases re-name it at the same time. Is this what your looking to do? |
|
#4
|
|||
|
|||
|
Re: Upload redirection
Hi, thanks for your replies.
I just read it back, and it's not clear at all ha. Basically, The upload script would be in on my server /file/file2 but I was wondering if it would be possible to send the file to /file1/ On my server because I need to keep the upload area secured but I need the files to be moved into a different file as they will be linked up to be downloaded. Thanks, Ross
Last Blog Entry: Blog Noughts and Crosses (Nov 14th, 2007)
Last edited by Ross; Feb 26th, 2007 at 09:02. |
|
#5
|
||||
|
||||
|
Re: Upload redirection
Yeah, that's possible. I would recommend using the FTP uploading functions, though. They're much easier to use and you don't need to worry about chmod settings and temporary files.
http://php.net/ftp |
|
#6
|
|||
|
|||
|
Re: Upload redirection
Cheers Ryan, I will give it ago when I get home.
Last Blog Entry: Blog Noughts and Crosses (Nov 14th, 2007)
|
|
#7
|
||||
|
||||
|
Re: Upload redirection
Oh, specifically ftp_put.
http://us2.php.net/manual/en/function.ftp-put.php There's a nice example there |
|
#8
|
|||
|
|||
|
Re: Upload redirection
Thanks Ryan for those, I haven't got around to trying them yet, but I will post when I get it working (and someone hijacks my server due to it and stores porn on it, because I mucked it up
Have a great day, Ross
Last Blog Entry: Blog Noughts and Crosses (Nov 14th, 2007)
|
|
#9
|
||||
|
||||
|
Re: Upload redirection
Haha, hopefully that won't happen, but if it does, free porn! Woohoo!
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Form Redirection | madmax | PHP Forum | 4 | Jun 4th, 2007 17:35 |
| Frame redirection with PHP | linchpin311 | PHP Forum | 2 | May 17th, 2007 17:35 |
| Site Redirection | Maverick25r | Web Page Design | 2 | Oct 6th, 2006 12:33 |
| redirection problem | iamzoli | PHP Forum | 12 | Apr 11th, 2004 08:48 |