Current location: Hot Scripts Forums » Programming Languages » PHP » PHP upload without using a form


PHP upload without using a form

Reply
  #11 (permalink)  
Old 11-13-07, 08:33 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Acecool, the form type="file" value field is read only. It cannot be set (many people have tried.) If you have or find working code that can do this, please post it.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #12 (permalink)  
Old 11-13-07, 11:03 PM
Acecool's Avatar
Acecool Acecool is offline
Aspiring Coder
 
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Im saying, since he knows where the files are located on his computer, he should make a form and fill in the values... then when the page is loaded have javascript simulate pressing the submit button..

Josh
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Reply With Quote
  #13 (permalink)  
Old 11-13-07, 11:21 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
If you read what I wrote (or try it yourself), you cannot set the value. You cannot use a value="..." parameter in the HTML nor can you write the value using javascript.

Again, if you have or find working code that can accomplish what you think, please post it.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #14 (permalink)  
Old 11-14-07, 12:19 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
zaher, synchronizing files is best done server to server. If you can setup the source where the files are at as a server, you can use php running on the source server to write the files to the destination using the FTP protocol, or you can use php running on the destination server to read them from the source server using the FTP protocol, or you can use php running on the destination server to read them from the source server using the http/https protocol.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #15 (permalink)  
Old 11-14-07, 05:58 AM
zaher zaher is offline
Newbie Coder
 
Join Date: Nov 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you guys.

Anyway, I have switched to Java for this project, and created a java applet and application to do so, and it worked out well.

I just got one issue with that java application which i have described in this thread.
Reply With Quote
  #16 (permalink)  
Old 04-04-11, 11:29 AM
ItsMee ItsMee is offline
New Member
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Multiple Uploads with PHP without using a form

So you want to upload multiple files without a form using PHP? I do not know the specifics of what you are trying to do, but I had an idea. What if you use a single form where you upload an archive that is organized to put the multiple files where they belong on the server? You could upload the single archive file, and then use copy() or rename() to copy or move the files to the appropriate locations on the server after the archive has been extracted. Would that work in your case?

Last edited by ItsMee; 04-04-11 at 11:30 AM. Reason: added " after the archive has been extracted"
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php upload file script xavier039 PHP 5 08-29-06 04:35 PM
submit form in php danlew PHP 11 01-11-06 03:34 AM
Simple order PHP form to Email wearetwo PHP 8 01-06-06 03:33 AM
Web form to upload, and report the file name to database fompsweeva PHP 2 01-04-06 02:18 AM
PHP: Different table entry from same form? Stormrider Script Requests 3 05-07-05 08:19 AM


All times are GMT -5. The time now is 07:32 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.