ความหมายและการใช้งานฟังก์ชัน ftp_raw() ใน php (พีเอชพี)
ฟังก์ชัน ftp_raw() เป็นการส่งคำสั่งไปยังเซิร์ฟเวอร์ FTP (เอฟทีพี)
รูปแบบการเขียน (Syntax) :
ftp_raw(ftp_connection,command);
โดยกำหนดให้
ftp_connection แทน ระบุการเชื่อมต่อ FTP ที่จะใช้ (ต้องระบุ)
command แทน ระบุคำสั่งเพื่อดำเนินการ (ต้องระบุ)
ตัวอย่าง
<?php
// connect to FTP server
$ftp_server = "test.com";
$ftp_conn = ftp_connect($ftp_server) or die("ไม่สามารถเชื่อมต่อ $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");
?>
ผลลัพธ์
ข้อมูลอ้างอิง : www.w3schools.com