protected openFileForWriting ( string $path ) : resource | ||
$path | string | The path to the file |
Результат | resource | Specifier for the target file |
protected function openFileForWriting($path)
{
if (($handler = @fopen($path, 'w')) === false) {
throw new IOException('The file "' . $path . '" could not be opened for writing. Check if PHP has enough permissions.');
}
return $handler;
}