PHP is_writeable()函数 is_writeable()函数可以检查指定的文件是否可写。如果文件可写,此函数将返回true。它是is_writable()函数的别名。 语法 bool is_writeable ( string $filename )PHPCopy 示例 <?php file = "/PhpProject/php/phptest.txt"; if(is_writeable(file)) { echo ("file is writeable"); } else { echo ("file is not wrietable"); } ?>PHPCopy 输出 /PhpProject/php/phptest.txt is writeablePHPCopy