定制 and/symlink-detective 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

and/symlink-detective

最新稳定版本:0.5

Composer 安装命令:

composer require and/symlink-detective

包简介

Library allows to determine realpath to your script when you try to do it from symlinked file

README 文档

README

Latest Stable Version Latest Unstable Version License composer.lock

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/exists
  • SymlinkDetective::detectPath(__DIR__ . '/../unexistent-file') returns /var/www/libs/library/unexistent-file as file not found and Exception throwing is muted (3rd argument)

统计信息

  • 总下载量: 9.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-11-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固