-
Notifications
You must be signed in to change notification settings - Fork 1
Stream: isWritable Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\Stream
Write data to the stream.
-
return
bool
Example:
$resource = fopen(BOOTSTRAP_DIR . '/sample/shieldon_logo.png', 'r+');
$stream = new \Shieldon\Psr7\Stream($resource);
if ($stream->isWritable()) {
echo 'File is writable';
}
// Outputs: File is writable
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.