4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: camo93 on February 03, 2003, 10:08:08 AM
-
Hello,
Many people having problems with SAFE MODE.
It's possible to include de ftp_mkdir and not mkdir in your categorie.php script file.
and open a configurable ftp connexion like this :
<?php
$ftp_server='180.10.11.12';//serverip
$conn_id = ftp_connect($ftp_server);
// login with username and password
$user="mart";//username
$passwd="575";//password
$login_result = ftp_login($conn_id, $user, $passwd);
// check connection
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed!";
echo "Attempted to connect to $ftp_server for user $ftp_user_name";
die;
} else {
echo "
Connected to $ftp_server, for user $user
";
}
$serkan="gokerez";
ftp_chdir($conn_id,"www.xxx.com");
if(ftp_mkdir($conn_id,$serkan)) print ("File is created!");
ftp_close($conn_id);
?>
And the problems with safe mode is finished.
Regards;
Camo
-
This needs the FTP extension enabled for php and most users will not have it enabled. But if you have written a modifcation feel free to post it the Mods Forum.
Jan
-
Why not allow two possibilities in a file of config?
-
Maybe be for the next version ;)
Jan
-
okay thank you,
Can I have really a problem with the code you modify a fragment of the code so that it work with ftp_mkdir and initiating a transfer ftp?
It would be really nice because it is difficult to have to manage all that by ftp, to remove and recreate the directory.
I'm not a pro of php for the modifications.
Regards,
Camo