Download the PHP package whmcsexpert/symlink-detective without Composer
On this page you can find all versions of the php package whmcsexpert/symlink-detective. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download whmcsexpert/symlink-detective
More information about whmcsexpert/symlink-detective
Files in whmcsexpert/symlink-detective
Download whmcsexpert/symlink-detective
More information about whmcsexpert/symlink-detective
Files in whmcsexpert/symlink-detective
Vendor whmcsexpert
Package symlink-detective
Short Description Library allows to determine realpath to your script when you try to do it from symlinked file
License
Package symlink-detective
Short Description Library allows to determine realpath to your script when you try to do it from symlinked file
License
Please rate this library. Is it a good library?
Informations about the package symlink-detective
SymlinkDetective - real detective for unreal paths
Hey, this library is allows you to find the real path from all that mess, if you use symlinks for some directories in your project. Just and example:
- Project root dir:
/var/www/sites/your-project
/var/www/sites/your-project/library
is pointed to/var/www/libs/library
/var/www/sites/your-project/public
with app.php inside is pointed to/var/www/libs/frontend
(so/var/www/sites/your-project/public/app.php
is pointed to/var/www/libs/frontend/app.php
)
If somewhere in library (/var/www/libs/library
) you do reference to some path like library/../app/config.php
- your path be equal to
/var/www/libs/library/../app/config
==/var/www/libs/app/config
, and guess - paths is not exists.
But there is solution - you can call SymlinkDetective::detectPath(__DIR__ . '/../app/config')
and mr. SymlinkDetective will do the magic
Examples
SymlinkDetective::detectPath(__DIR__ . '/../app/config')
returns/var/www/sites/your-project/app/config
SymlinkDetective::detectPath(__FILE__, '/../app/config')
returns/var/www/sites/your-project/app/config
SymlinkDetective::detectPath(__FILE__, '/../app/unexistent-file', false)
throws an Exception as file doesn't found/existsSymlinkDetective::detectPath(__DIR__ . '/../unexistent-file')
returns/var/www/libs/library/unexistent-file
as file not found and Exception throwing is muted (3rd argument)
All versions of symlink-detective with dependencies
PHP Build Version
Package Version
Requires
webmozart/path-util Version
~2.3
The package whmcsexpert/symlink-detective contains the following files
Loading the files please wait ....