(No version information available, might be only in CVS)
Phar::mount — Mount an external path or file to a virtual location within the phar archive
void Phar::mount ( string $pharpath , string $externalpath )
Much like the unix file system concept of mounting external devices to paths within the directory tree, Phar::mount() allows referring to external files and directories as if they were inside of an archive. This allows powerful abstraction such as referring to external configuration files as if they were inside the archive.
No return. PharException is thrown on failure.
Throws PharException if any problems occur mounting the path.
Пример #1 A Phar::mount() example
The following example shows accessing an external configuration file as if it were a path within a phar archive.
First, the code inside of a phar archive:
Next the external code used to mount the configuration file:
Another method is to put the mounting code inside the stub of the phar archive. Here is an example of setting up a default configuration file if no user configuration is specified:
...and the code externally to load this phar archive:
Сервисы от Prime-Hosting.Ru:
Copyright © 2008-2010