MyBB Hacks

Full Version: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
The question, is I don't know how.
(08-11-2011 07:09 AM)Gypaete Wrote: [ -> ]The question, is I don't know how.

I hope this link can help:
http://php.net/manual/en/function.mkdir.php

PHP Code:
<?php

DEFINE ('FTP_USER','yourUser');
DEFINE ('FTP_PASS','yourPassword');

/**
 * Returns the created directory or false.
 *
 * @param Directory to create (String)
 * @return Created directory or false;
 */

function mkDirFix ($path) {
   
   
        $path = explode("/",$path);
        $conn_id = @ftp_connect("localhost");
        if(!$conn_id) {
            return false;
        }
        if (@ftp_login($conn_id, FTP_USER, FTP_PASS)) {
           
            foreach ($path as $dir) {
                if(!$dir) {
                    continue;
                }
                $currPath.="/".trim($dir);
                if(!@ftp_chdir($conn_id,$currPath)) {
                    if(!@ftp_mkdir($conn_id,$currPath)) {
                        @ftp_close($conn_id);
                        return false;
                    }
                    @ftp_chmod($conn_id,0777,$currPath);
                }
            }
        }
        @ftp_close($conn_id);
        return $currPath;
   
}
?>

That helps me, thanks. (What a fool I am, i forgot look there!).

Do not close the issue by if I have a problem or something. Thanks.

(08-10-2011 09:01 PM)Gypaete Wrote: [ -> ]OFF: I'm doing a guide super in Spanish of Xthreads, and I wanted ask you permission. ¿I can?
You can write anything about it regardless of whether I give you permission or not.
But it is to make things clear, if there are problems. Thanks.
[Image: 69412138.png]
[Image: 56560490.png]
[Image: 97001333.png]
[Image: 88947234.png]
[Image: 25117827.png]

Do they like?

Look this: http://www.sekai-manga.es/mo/
What is your opinion?
I have one error.

In this line:

PHP Code:
$conn_id = @ftp_connect("localhost");


My FTP is: http://ftp.strato.com
Then, is:

PHP Code:
$conn_id = @ftp_connect("ftp.strato.com");

OR

PHP Code:
$conn_id = @ftp_connect("ftp://ftp.strato.com");


How? (None of the forms, don't works for me correctly.)

This is OK?: DEFINE('FTP_USER', 'sekai-manga.es');

Help me.

http://www.php.net/manual/en/function.ftp-connect.php

I just love it how you leave out details, so I shall do the same.
But how do I do with this code?

PHP Code:
<?php

DEFINE ('FTP_USER','yourUser');
DEFINE ('FTP_PASS','yourPassword');

/**
 * Returns the created directory or false.
 *
 * @param Directory to create (String)
 * @return Created directory or false;
 */

function mkDirFix ($path) {
   
   
        $path = explode("/",$path);
        $conn_id = @ftp_connect("localhost");
        if(!$conn_id) {
            return false;
        }
        if (@ftp_login($conn_id, FTP_USER, FTP_PASS)) {
           
            foreach ($path as $dir) {
                if(!$dir) {
                    continue;
                }
                $currPath.="/".trim($dir);
                if(!@ftp_chdir($conn_id,$currPath)) {
                    if(!@ftp_mkdir($conn_id,$currPath)) {
                        @ftp_close($conn_id);
                        return false;
                    }
                    @ftp_chmod($conn_id,0777,$currPath);
                }
            }
        }
        @ftp_close($conn_id);
        return $currPath;
   
}
?>

Maybe you need to read the explanation about the Parameters there (host). There is an example for that.
Pages: 1 2 3
Reference URL's