Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #11
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
The question, is I don't know how.

[Image: selenab.png]
08-11-2011 07:09 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #12
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
(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

08-11-2011 07:38 AM
Find all posts by this user Quote this message in a reply
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #13
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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.


[Image: selenab.png]
08-11-2011 07:51 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #14
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
(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.

My Blog
08-11-2011 08:43 AM
Find all posts by this user Quote this message in a reply
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #15
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
But it is to make things clear, if there are problems. Thanks.

[Image: selenab.png]
08-11-2011 08:56 AM
Find all posts by this user Quote this message in a reply
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #16
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
[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?

[Image: selenab.png]
08-22-2011 07:22 PM
Find all posts by this user Quote this message in a reply
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #17
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
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.


[Image: selenab.png]
08-22-2011 08:16 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #18
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
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.

My Blog
08-22-2011 08:37 PM
Find all posts by this user Quote this message in a reply
Gypaete Offline
Member
***
Posts: 82
Joined: Aug 2010
Post: #19
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
But how do I do with this code?

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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;
   
}
?>


[Image: selenab.png]
08-22-2011 08:55 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #20
RE: Upload zip, rar in one folder specific and Extract zip, rar in one folder specific
Maybe you need to read the explanation about the Parameters there (host). There is an example for that.

08-23-2011 01:42 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: