teedmaker/tmphp-server-info
Composer 安装命令:
composer require teedmaker/tmphp-server-info
包简介
Get info from actual server
README 文档
README
TMPHP Server Info
This project generate constants that can be used in PHP projects.
For example, you can get actual url access by user like a charm:
$base = BASE; ... echo "<a href=\"{$base}/new-url/test\">go to another page</a>";
Or, if you need the URL containing all things, like: http://site.com/teste[?user=lorem]
Then, you can uses:
$url = ACTUAL; echo "<span>Real URL is: {$url}</a>";
Of course, you can use that in all places:
class AnotherClass { /** * This will return this url containing the base url */ public function getUrl(string $url) { return BASE . $url; } }
Ready to start?
You can see how to install here!
You can see how to use here!
Found a error or a possibility?
Fork it and send us a pull request 😉
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-11