PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Browse Directory Posted by DavidJackson4 on 2 May 2004 at 8:36 AM
I was wondering whether anyone could give me any ideas on how to make a "Browse Directory" button, by that I mean a button that the client could press and then all the directories on his local computer would pop up and he could select a file to be uploaded.

If possible I'd like a ready made script but if not it would be cool if someone could help me break it down into the basic steps b/c I don't know where to start on this.
Report
Re: Browse Directory Posted by d00zer on 3 May 2004 at 9:30 AM
For the browser button:

<form action="upload.php" name="upload" method="post" ENCTYPE="multipart/form-data">
<input name="userfile" type="file">
<input type="submit" value="Upload">
<input type="reset" value="Reset">
</form>


Here is my upload script:
http://neux.servebeer.com/upload


n e v e r s l o w d o w n
http://neux.servebeer.com

Report
Re: Browse Directory Posted by Johnny13 on 3 May 2004 at 9:30 AM
//untested..
<form action="<?echo $_SERVER['PHP_SELF']?>" method=post enctype="multipart/form-data">
<input type=file name="Crap"><input type=submit name=Upload></form>
<?if(!empty($_FILES['Crap'])) {$dir='crap/';
if(move_uploaded_file($_FILES['Crap']['tmp_name'],$dir.$_FILES['Crap']['name']))
{echo $_FILES['Crap']['size'].'bytes uploaded';}}?>



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.