file_put_contents
laravel/octane
Supported Versions: PHP 5, PHP 7, PHP 8
Write data to a file
file_put_contents
(
string $filename
,
mixed $data
,
int $flags
=
0
,
?
resource $context
=
null
):
int
|
false
throw new
RuntimeException
(
'Unable to write to process ID file.'
);
}
file_put_contents
(
$this
->
path
,
json_encode
(
array_merge
(
$this
->
read
(), [
'masterProcessId'
=>
$masterProcessId
]),
JSON_PRETTY_PRINT
));
}
src/RoadRunner/ServerStateFile.php
throw new
RuntimeException
(
'Unable to write to process ID file.'
);
}
file_put_contents
(
$this
->
path
,
json_encode
(
array_merge
(
$this
->
read
(), [
'state'
=>
$newState
]),
JSON_PRETTY_PRINT
));
}
src/RoadRunner/ServerStateFile.php
throw new
RuntimeException
(
'Unable to write to process ID file.'
);
}
file_put_contents
(
$this
->
path
,
json_encode
(
array_merge
(
$this
->
read
(), [
'masterProcessId'
=>
$masterProcessId
,
'managerProcessId'
=>
$managerProcessId
,
]),
JSON_PRETTY_PRINT
));
}
src/Swoole/ServerStateFile.php
throw new
RuntimeException
(
'Unable to write to process ID file.'
);
}
file_put_contents
(
$this
->
path
,
json_encode
(
array_merge
(
$this
->
read
(), [
'state'
=>
$newState
]),
JSON_PRETTY_PRINT
));
}
src/Swoole/ServerStateFile.php