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

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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 28th, 2004, 10:14 AM
fireatwill's Avatar
fireatwill fireatwill is offline
Mon The Biffy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Location: Scotland
Posts: 630 fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level)fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level)fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level)fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level)fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level)fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level)fireatwill User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 13 h 19 m 36 sec
Reputation Power: 100
Send a message via MSN to fireatwill
ftp problems

Hi. When I try to upload something it doesn't work. I have ftp enabled, i checked. here is my code:

PHP Code:
<?php
if(!empty($local))
{
$ftp_server "";
$loginname "";
$password "";

//info above not given for obvious reasons


$connection ftp_connect($ftp_server);
$login_result ftp_login($connection$loginname$password);
if(!
$connection || !$login_result)
{
print 
"Connection to FTP server disallowed!";
}
else
{
print 
"Connection made...\n";
}
$remote="/";
$upload ftp_put($connection$remote$localFTP_ASCII) or die("Can't upload file");
}
else
{
?>
<form action="<?php $PHP_SELF?>" method="post">
Upload file: <input type="file" name="local"><br>
<input type="submit" value="upload">
</form>

<?php
}
ftp_close($connection);
?>


I also get an error where it says I have called an undefined function ftp_close(). The last time I checked that was a function

fire

Reply With Quote
  #2  
Old January 28th, 2004, 12:22 PM
file cabinet file cabinet is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 411 file cabinet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 46 sec
Reputation Power: 5
http://us4.php.net/manual/en/function.ftp-close.php
Quote:
(PHP 4 >= 4.2.0)

what vers is the server running?
Code:
echo phpversion();

http://us4.php.net/manual/en/function.phpversion.php

Reply With Quote
  #3  
Old January 29th, 2004, 02:38 PM
mhaller mhaller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 11 mhaller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hi,
just in case you need a way to upload multiple files or recursively directories via http, let me know. i have a solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > ftp problems


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 2 hosted by Hostway