|
SplFileInfo::openFileGets an SplFileObject object for the file Description
public SplFileObject SplFileInfo::openFile
([ string
$open_mode = "r"
[, bool $use_include_path = false
[, resource $context = NULL
]]] )Creates an SplFileObject object of the file. This is useful because SplFileObject contains additional methods for manipulating the file whereas SplFileInfo is only useful for gaining information, like whether the file is writable. Parameters
Return ValuesThe opened file as an SplFileObject object. Errors/ExceptionsA RuntimeException if the file cannot be opened (e.g. insufficient access rights). Examples
Example #1 SplFileInfo::openFile example
<?php See Also
|