0Z0SK0
25.02.2023, 18:47
SFTP (https://www.blast.hk/redirect/aHR0cHM6Ly93d3cucGhwLm5ldC9tYW51YWwvcnUvZnVuY3Rpb2 4uc3NoMi1zZnRwLnBocA)
или
PHP:
$subdomain_host
=
'localhost'
;
$subdomain_user
=
'root'
;
$subdomain_pass
=
'root'
;
$subdomain_path
=
'/home/'
;
$domain_path
=
getcwd
(
)
;
$connection
=
ftp_ssl_connect
(
$subdomain_host
)
;
ftp_login
(
$connection
,
$subdomain_user
,
$subdomain_pass
)
;
ftp_pasv
(
$connection
,
true
)
;
ftp_chdir
(
$connection
,
$subdomain_path
)
;
ftp_put
(
$connection
,
$subdomain_path
.
"filename"
,
$domain_path
.
"/filename"
,
FTP_BINARY
)
;
ftp_close
(
$connection
)
;
или
PHP:
$subdomain_host
=
'localhost'
;
$subdomain_user
=
'root'
;
$subdomain_pass
=
'root'
;
$subdomain_path
=
'/home/'
;
$domain_path
=
getcwd
(
)
;
$connection
=
ftp_ssl_connect
(
$subdomain_host
)
;
ftp_login
(
$connection
,
$subdomain_user
,
$subdomain_pass
)
;
ftp_pasv
(
$connection
,
true
)
;
ftp_chdir
(
$connection
,
$subdomain_path
)
;
ftp_put
(
$connection
,
$subdomain_path
.
"filename"
,
$domain_path
.
"/filename"
,
FTP_BINARY
)
;
ftp_close
(
$connection
)
;