this problem i haven't sovled for 2 days..
you see, when i place this php code on a different server, it works.
Code: Select all
$ftp_id = ftp_connect("ftp.mobilemo.com");
$ret = ftp_login($ftp_id, "mobilem", "xxxxxx");
//$ret = ftp_login($ftp_id, "mickey", "karen");
//print("$ret<br/>");
//$ret = ftp_chdir($ftp_id, "www/");
//print("$ret<br/>");
$ret = ftp_pwd($ftp_id);
print("$ret<br/>");
$files = ftp_nlist($ftp_id, "digitel/midi");
{
foreach($files as $file)
{
$offset = strrpos($file, ""e;) + 1;
$ringTone = substr($file, $offset);
print("<a href="logo2.php?midi=$ringTone?subA=123456789?rldownload=true">$ringTone</a><br/>");
//$midi = fopen("midi.mid", "wb+");
//ftp_fget($ftp_id, $midi, $file, FTP_BINARY);
}
}$files = ftp_nlist($ftp_id, "digitel/midi");
i don't understand why that won't work once the php file is on the ftp server itself..
my 2nd question, if i can't make that to work, is there a file that lists all the files on a current directory? i couldn't find such function on the php manual. this would be my other way around...
many thanks.