PHP ftp_exec() လုပ်ဆောင်ချက်
ဥပမာ
FTP ဆာဗာပေါ်ရှိ command တစ်ခုကို အကောင်အထည်ဖော်ရန် တောင်းဆိုချက်-
<?php
// connect and login to FTP server
$ftp_server = "ftp.example.com";
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
$login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass);
$command = "ls-al > somefile.txt";
// execute command
if (ftp_exec($ftp_conn,$command))
{
echo "$command executed successfully.";
}
else
{
echo "Execution of $command failed.";
}
// close connection
ftp_close($ftp_conn);
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ftp_exec() လုပ်ဆောင်ချက်သည် FTP ဆာဗာပေါ်ရှိ အမိန့်တစ်ခုအား လုပ်ဆောင်ရန် တောင်းဆိုသည်။
အထားအသို
ftp_exec(ftp_conn, command);
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အမိန့်ကို အောင်မြင်စွာ လုပ်ဆောင်ခဲ့ပါက အမှန်ပါ။ မဟုတ်ရင် မှားမယ်။ |
---|---|
PHP ဗားရှင်း- | 4.0.3+ |
❮ PHP FTP အကိုးအကား