I want to add user to my ftp server users.ini file automatically when user register at my site
I am testing this on a test script but it does not write and/or append info the the users.ini file
Here is what I did:
Code:
<php?
$fr = fopen ("e:/www/G6_FTP_Server/users.ini", "a+");
if (!$fr) {
echo ("Error! Could not open File");
exit;
} else {
fputs ('e:/www/FTP_Server/users.ini' , "[$username]\n");
fclose ($fr);
}
if (!fclose ($fr)) {
echo ("Error! Could not close File");
}
?>
Actually the data I want to put into the users.ini is not just one line I want to define a $NewUserData as follows:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum