ftp_site() , I am using this command to tell the server about new user .
(create a ftp user account using php /window’s platform)
This is my code.
<? php
//ftp_site — Sends a SITE command to the server
$group = "ftp_private";// FileZilla server GROUP
$username ="newuser"; // NEW USER
$password = "password"; // NEW USER password
ftp_site($ftp_stream,"SITE ADDUSER $group $username $password");
if (ftp_site($ftp_stream,'SITE ADDUSER $group $username $password'))
{ echo "Command executed successfully.\n"; }
else
{ die('Command failed.');
}
?>
I am getting error
Warning: ftp_site() expects parameter 1 to be resource, null given in C:\xampp\htdocs\shall\site.php on line 9
Warning: ftp_site() expects parameter 1 to be resource, null given in C:\xampp\htdocs\shall\site.php on line 11
Command failed.
Can anyone tell me where i am going wrong?
Thank U all