English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Tutorial PHP Básico

Tutorial PHP Avançado

PHP & MySQL

Manual de Referência PHP

Uso e exemplo da função PHP is_writeable()

PHP Filesystem Referência

A função is_writeable() pode verificar se um arquivo específico é gravável. Se o arquivo for gravável, esta função pode retornar true. É sinônimo da função is_writable().

Sintaxe

bool is_writeable ( string $filename )

Exemplo online

<?php
   $file = "/PhpProject/php/phptest.txt";
   if(is_writeable($file)) {
       echo("$file é gravável");
   } else {
       echo("$file não é gravável");
   }
?>

Resultado de saída

/PhpProject/php/phptest.txt é gravável

PHP Filesystem Referência