IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 26th, 2004, 07:00 AM
Rubal Rubal is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 81 Rubal User rank is Lance Corporal (50 - 100 Reputation Level)Rubal User rank is Lance Corporal (50 - 100 Reputation Level)Rubal User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 h 19 m 22 sec
Reputation Power: 6
Angry Uploading file thru PHP Script ..

Hello -

I am using this PHP Upload script to upload file on my webspace. Its connects properly but fails to upload file. I am trying to upload test.txt file from my c:\ to my webs wwwroot directory .Can someone have a look and let me know where I am going wrong :

Quote:
<?php
/*
* Uploads screenshots and inserts all of the info into database */
//ftp user info
$username="username";
$password="password";
$host="ftp.mydomain.com";
$path="//wwwroot//test.txt";

//variables to connect and login to ftp
$conn_id = ftp_connect($host);
$login_result = ftp_login($conn_id, $username, $password);

if ((!$conn_id) || (!$login_result))
{
die("Connection to FTP failed!");
}

//upload the file onto the server
$upload = ftp_put($conn_id, $path, "C://test.txt", FTP_BINARY);

if (!$upload)
{
die("FTP upload has failed!");
}
//close ftp connection
ftp_close($conn_id);

?>
__________________
Rubal Jain
Webspiders Interweb Pvt. Ltd. & Brainus Networks
http://www.it2ecom.com | http://www.brainus.net
Server Management | Dedicated Servers | Reseller Hosting
Experienced, Qualified Techs | 24/7 Support Centers in India
Helm Premium Partners | Email : sales@brainus.net

Reply With Quote
  #2  
Old January 26th, 2004, 01:56 PM
Doug G Doug G is online now
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,979 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 18 h 12 m 56 sec
Reputation Power: 802
I don't run PHP on Windows, maybe someone else has used PHP uploads on a windows box.

Reply With Quote
  #3  
Old January 28th, 2004, 02:17 AM
edwinbrains's Avatar
edwinbrains edwinbrains is offline
Retired Moderator
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Jan 2004
Location: London, UK
Posts: 6,670 edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)  Folding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced Folder
Time spent in forums: 1 Week 6 Days 23 h 39 m 19 sec
Reputation Power: 92
Hi,

I've got uploads working on a Windows server. I'm not sure what is wrong with your code, but I followed the guide at http://www.phpfreaks.com/tutorials/85/0.php and this got me going fine!

HTH,

Edwin

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > Uploading file thru PHP Script ..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT