PHP ftp_raw()ฟังก์ชัน
ตัวอย่าง
เชื่อมต่อกับเซิร์ฟเวอร์ FTP และรันคำสั่ง:
<?php
// connect to FTP server
$ftp_server = "ftp.example.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
// the two lines below is the same as: ftp_login($ftp_conn,"john","secretpassword");
ftp_raw($ftp_conn, "USER john");
ftp_raw($ftp_conn, "PASS secretpassword");
?>
ความหมายและการใช้งาน
ฟังก์ชัน ftp_raw() ส่งคำสั่งดิบไปยังเซิร์ฟเวอร์ FTP
ไวยากรณ์
ftp_raw(ftp_conn, command);
ค่าพารามิเตอร์
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
รายละเอียดทางเทคนิค
คืนมูลค่า: | การตอบสนองจากเซิร์ฟเวอร์เป็นอาร์เรย์ของสตริง |
---|---|
รุ่น PHP: | 5+ |
❮ การอ้างอิง PHP FTP