Author Topic: Suggest  (Read 4725 times)

0 Members and 1 Guest are viewing this topic.

Offline camo93

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://central-galerie.com
Suggest
« 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 :

Quote
<?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

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Suggest
« Reply #1 on: February 03, 2003, 11:00:39 AM »
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
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline camo93

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://central-galerie.com
Suggest
« Reply #2 on: February 03, 2003, 11:09:31 AM »
Why not allow two possibilities in a file of config?

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Suggest
« Reply #3 on: February 03, 2003, 11:14:44 AM »
Maybe be for the next version ;)

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline camo93

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • http://central-galerie.com
Suggest
« Reply #4 on: February 03, 2003, 12:24:54 PM »
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