PHP ftp_chmod() လုပ်ဆောင်ချက်
ဥပမာ
ဖိုင်ခွင့်ပြုချက်များကို သတ်မှတ်ပါ-
<?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);
$file = "php/test.txt";
// Try to set read and write for owner and read for everybody else
if (ftp_chmod($ftp_conn, 0644, $file) !== false)
{
echo "Successfully chmoded $file to 644.";
}
else
{
echo "chmod failed.";
}
// close connection
ftp_close($ftp_conn);
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ftp_chmod() လုပ်ဆောင်ချက်သည် FTP မှတစ်ဆင့် သတ်မှတ်ထားသော ဖိုင်ပေါ်တွင် ခွင့်ပြုချက်များကို သတ်မှတ်ပေးသည်။
အထားအသို
ftp_chmod(ftp_conn, mode, file);
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
mode | Required. Specifies the new permissions. This parameter consists of four numbers:
Possible values (to set multiple permissions, add up the following numbers):
|
file | Required. Specifies the file to set permissions on |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အောင်မြင်မှုတွင် ဖိုင်အသစ်ခွင့်ပြုချက်များ၊ ပျက်ကွက်မှုတွင် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | ၅+ |
❮ PHP FTP အကိုးအကား