/    Sign up×
Community /Pin to ProfileBookmark

Local File Browser class

Hey guys!

Can someone point me to a local file browser class/script.

I need our members to be able to upload an image to the server. I’ve seen a ton of classes for server-side file browsing, but I need something like the standard windows file browser.

Thanks.

CM

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@aaronbdavisFeb 20.2006 — If they just need to be able to upload the picture, you can use[code=html]<input type="file" name="myfile"/>[/code] which will automatically create a button labeled "browse" next the text box. When the user clicks on browse, it will bring up an Open Dialog window. After the user submits the form, you can access the uploaded file with $_FILES['myfile'].
Copy linkTweet thisAlerts:
@NogDogFeb 20.2006 — Hmmmm.... you don't mean the standard HTML file input element?
[code=html]
<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="__URL__" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
[/code]

See http://us2.php.net/manual/en/features.file-upload.php form more info (which is where I copied-and-pasted the above HTML from).
Copy linkTweet thisAlerts:
@CrazyMerlinauthorFeb 20.2006 — oh man! Sorry, been a long day.......file upload firls...of course! Doh!
Copy linkTweet thisAlerts:
@CrazyMerlinauthorFeb 20.2006 — ok, getting an error using this:

Warning: move_uploaded_file(../uploadeddruidsglen.gif): failed to open stream: Permission denied in /home/predictm/public_html/forms/form_profile.php on line 220

Warning: move_uploaded_file(): Unable to move '/tmp/phpaizjRP' to '../uploadeddruidsglen.gif' in /home/predictm/public_html/forms/form_profile.php on line 220

I have chmod the upload directory to 777. Anyone tell me why I'm getting this error?

Thanks.
Copy linkTweet thisAlerts:
@CrazyMerlinauthorFeb 20.2006 — Ignore.....I forgot the trailing /

thanks.
×

Success!

Help @CrazyMerlin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...