upload

This is a discussion on "upload" within the PHP Forum section. This forum, and the thread "upload are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 14th, 2007, 21:23
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
upload

For those who read PHP. What is this saying I think I get the gist but not 100% sure. The script below is an upload script. Not my area, please help

// Where the file is going to be placed $target_path = "uploads/"; /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $_FILES['uploadedfile']['tmp_name']; $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; }
Reply With Quote

  #2 (permalink)  
Old Apr 14th, 2007, 22:37
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: upload

I really never understood why the FTP functions are so underrated. It's a million times easier to use those to upload files.

PHP: Select all

<?php

$conn 
ftp_connect($ftp_server); 
$login_result ftp_login($conn$ftp_user_name$ftp_user_pass); 

$upload ftp_put($conn$destination_file$source_fileFTP_BINARY); 

ftp_close($conn); 
?>
http://www.php.net/ftp/
Reply With Quote
Reply

Tags
problem, script error, upload

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS stuck during upload danielden Classic ASP 1 Apr 17th, 2008 15:54
Upload redirection Ross PHP Forum 8 Feb 28th, 2007 23:32
File Upload magiccupcake PHP Forum 1 Jan 22nd, 2007 05:10
Upload script Perad PHP Forum 4 Nov 27th, 2006 23:40
What is best way to upload pic’s chuckcampbell Web Page Design 12 Oct 8th, 2005 01:16


All times are GMT. The time now is 05:27.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43