LearningJunkie
New member
I'm working through an example in a great PHP teaching book called "Spring Into PHP 5."
The goal is to connect to an FTP server and get a listing of the directory code22 on that server. The code is as follows:
$connect = ftp_connect("ftp.ispname.com");
$result = ftp_login($connect, "username", "password");
$a = ftp_nlist($connect, "code22");
foreach($a as $value) {
echo $value, "<BR>";
}
This code, however, runs but does not return any listings. Are "ftp.ispname.com" and "code22" things that I need to create, or are they things that already exist on the web?
I'm running a Mac with MAMP as my server.
Thank you for answering my newbie question!
The goal is to connect to an FTP server and get a listing of the directory code22 on that server. The code is as follows:
$connect = ftp_connect("ftp.ispname.com");
$result = ftp_login($connect, "username", "password");
$a = ftp_nlist($connect, "code22");
foreach($a as $value) {
echo $value, "<BR>";
}
This code, however, runs but does not return any listings. Are "ftp.ispname.com" and "code22" things that I need to create, or are they things that already exist on the web?
I'm running a Mac with MAMP as my server.
Thank you for answering my newbie question!