/    Sign up×
Community /Pin to ProfileBookmark

How can we upload files in PHP?

Hi friends,
How can we upload files in PHP? i want that user can be post own resume file through form. please tell me php script for that.
thanks for any reply.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@iBeZiJun 08.2013 — Using a form with a file input which is then captured by PHP which moves the file into a folder

[code=html]
<form method="post" enctype="multipart/form-data">
<input type="file" name="resume">
<input type="submit"
</form>

<?php
if(isset($_FILES['resume'])) {
$file = $_FILES['resume']['tmp_name'];
$path = "/files/".$_FILES['resume']['name'];
move_uploaded_file($file,$path);
}
?>
[/code]
Copy linkTweet thisAlerts:
@NogDogJun 08.2013 — Check out the "sticky" thread near the top of this forum on uploading images. (Just ignore any parts that would only apply to image manipulation.)
Copy linkTweet thisAlerts:
@hastxJun 09.2013 — The important thing to remember is not to overcomplicate it...uploading a file in PHP is very simple and can be done in a few lines of code...it is actually more complicated adding security to it, so my suggestion would be to get the upload working (maiking sure webserver has write permission to the folder, etc), then begin to lock it down and secure the input.
Copy linkTweet thisAlerts:
@sam051Jun 12.2013 — I also agree with all above answers and we suggest for my developers. The knowledge of PHP basis uploading is more complicated thing for developers so if you are new person in php http://www.csschopper.com/hire-dedicated-php-developer-professional.shtml then you can also hire any experiance developers from any company. I know that experienced company can solve your problem. I hope you also take CSS Chopper.com company for hiring of any kind of PHP developers.
×

Success!

Help @noahwilson 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...