पीएचपी चामोद () समारोह
❮ पीएचपी फाइल सिस्टम संदर्भउदाहरण
"Test.txt" फ़ाइल के लिए अनुमतियां बदलें:
<?php
// Read and write for owner, nothing for everybody else
chmod("test.txt",0600);
// Read and write for owner, read for everybody else
chmod("test.txt",0644);
// Everything for owner, read and execute for everybody else
chmod("test.txt",0755);
// Everything for owner, read for owner's group
chmod("test.txt",0740);
?>
परिभाषा और उपयोग
chmod () फ़ंक्शन निर्दिष्ट फ़ाइल की अनुमतियों को बदलता है।
वाक्य - विन्यास
chmod(file, mode)
पैरामीटर मान
Parameter | Description |
---|---|
file | Required. Specifies the path to the file |
mode | Required. Specifies the new permissions. The mode parameter consists of four numbers:
Possible values (to set multiple permissions, add up the following numbers):
|
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | सफलता पर सत्य, असफलता पर असत्य |
---|---|
पीएचपी संस्करण: | 4.0+ |
❮ पीएचपी फाइल सिस्टम संदर्भ