Forum Moderators: coopster
My Sample program
<?php
$ftp_server="server name";
$ftp_user="user name";
$ftp_pass="password";
echo "B4 connection";
$conn_id=ftp_connect($ftp_server);
....
....
...
?>
The above script is running upto the echo statement and not comes to the $conn_id definition line. Whats the reason? Can anyone help me?
I tried to that error code at top of page.But it still not response anything.
Now i am trying ftp functions with assigns the format of server name in $ftp_server as follows
$ftp_Server="ftp:// server name /";
My Sample program
<?php
$ftp_server="ftp://server name";
//$ftp_server="server name";
$ftp_user="user name";
$ftp_pass="password";
echo "B4 connection";
$conn_id=ftp_connect($ftp_server);
....
....
...
?>
This simple script runs and causes the following error.
Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed: Name or service
not known in /home/content/html/ftp_conn.php on line 9
Couldn't connect to ftp://server name/
First, you should not have "ftp://" in there. Have a closer look at the ftp_connect [php.net] function.