FTP

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
theBond
Forum Newbie
Posts: 19
Joined: Thu Jul 17, 2008 7:46 pm

FTP

Post by theBond »

i am using wampserver and installed ftp server filezilla.

This is the code i am using to connect,

Code: Select all

<?php
 
$ftpServer = "ftp://192.168.1.27";
$ftpUser = "user1";
$ftpPass = "user1";
 
set_time_limit(160);
 
$conn = @ftp_connect($ftpServer)
or die("Couldn't connect to FTP server");
 
$login = @ftp_login($conn, $ftpUser, $ftpPass)
or die("Login credentials were rejected");
 
$workingDir = ftp_pwd($conn);
echo "You are in the directory: $workingDir";
 
ftp_quit($conn);
 
?>
 
I am not able to connect. I am getting the message "Couldn't connect to FTP server";
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: FTP

Post by it2051229 »

is your FTP server running? i mean listening to ftp connections?
Post Reply