Dutch PHP Conference 2025 - Call For Papers

SplFileInfo::isWritable

(PHP 5 >= 5.1.2, PHP 7, PHP 8)

SplFileInfo::isWritableTells if the entry is writable

Опис

public SplFileInfo::isWritable(): bool

Checks if the current entry is writable.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Returns true if writable, false otherwise;

Приклади

Приклад #1 SplFileInfo::isWriteable() example

<?php
$info
= new SplFileInfo('locked.jpg');
if (!
$info->isWriteable()) {
echo
$info->getFilename() . ' is not writeable';
}
?>

Поданий вище приклад виведе щось схоже на:

locked.jpg is not writeable

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top