Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 23rd, 2007, 01:19 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default uploading files

please send me a simple codes about uploading files

Reply With Quote
  #2 (permalink)  
Old November 28th, 2007, 02:30 PM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
<?
$path = "uploads/";

$path = $path . basename( $_FILES['uploadedfile']['name']); 

move_uploaded_file($_FILES['uploadedfile']['tmp_name'],$target_path); 
?>

<form enctype="multipart/form-data"  method="POST">
File: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
it's a simple example

the directory "uploads" must exist
and must have 777 permissions
so the script can store files in it


---------------
Canon PowerShot SD1000
http://astore.amazon.com/powershot08-20

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
uploading files rj1406 ASP.NET 1.0 and 1.1 Basics 1 October 11th, 2004 10:27 AM
Uploading Files sami PHP How-To 7 April 16th, 2004 02:29 PM
Uploading files mildge Beginning PHP 6 December 1st, 2003 12:42 PM
uploading files by c# rborsatti C# 2 September 29th, 2003 03:29 AM



All times are GMT -4. The time now is 09:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.