FTP code
Posted: Mon Aug 18, 2008 12:45 pm
Hi
When I execute this code in linux console its work fine (all file in the ftp server) while on the firefox browser (linux) that gives nothing .
can you help me.
thanks
When I execute this code in linux console its work fine (all file in the ftp server) while on the firefox browser (linux) that gives nothing .
Code: Select all
#!/usr/bin/php -q
<?php
# set up basic connection
$ftp_server = 'alfa.singularweb.com';
$conn_id = ftp_connect($ftp_server);
# login with username and password
$ftp_user_name = 'tore';
$ftp_user_pass = 'tore';
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
# get contents of the current directory
$contents = ftp_nlist($conn_id, ".");
# output $contents
print_r($contents);
?>thanks