Home >php教程 >php手册 >php判断文件是否可写实例代码

php判断文件是否可写实例代码

WBOY
WBOYOriginal
2016-06-13 10:41:03954browse

php判断文件是否可写:

$filename = test.txt;
if (is_writable($filename)) {
        echo The file is writable;
} else {
        echo The file is not writable;
}
?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn