Valet有没有为ThinkPHP5框架量身定制的驱动程序?

2026-04-02 17:211阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计320个文字,预计阅读时间需要2分钟。

Valet有没有为ThinkPHP5框架量身定制的驱动程序?

以下ThinkPHP框架教程栏目将给大家介绍关于Valet是否适合ThinkPHP5的驱动问题,希望对需要的朋友有所帮助!

Valet是否适合ThinkPHP5的驱动?觉得Valet的思路很好,所以采用了这个来作为驱动。

下面thinkphp框架教程栏目将给大家介绍关于valet是否有适合thinkphp5的驱动的问题,希望对需要的朋友有所帮助!

valet 有没有适合thinkphp5的驱动?

觉得valet的思路很好所以采用了这个来做环境。

公司里面用thinkphp的人比较多。所以要使用thinkphp。(而且我是弄前端的,后端用啥也不会特别在意)

github.com/curder/blog/blob/master/tools/valet_support_thinkphp.md

这是thinkphp3-valet的。

↓↓↓↓↓↓↓

自己简单写了一个现在试的可以用。

<?php class ThinkPHP5ValetDriver extends ValetDriver { /** * Determine if the driver serves the request. * * @param string $sitePath * @param string $siteName * @param string $uri * @return bool */ public function serves($sitePath, $siteName, $uri) { return true; } /** * Determine if the incoming request is for a static file. * * @param string $sitePath * @param string $siteName * @param string $uri * @return string|false */ public function isStaticFile($sitePath, $siteName, $uri) { if (file_exists($staticFilePath = $sitePath.$uri)) { return $staticFilePath; } return false; } /** * Get the fully resolved path to the application's front controller. * * @param string $sitePath * @param string $siteName * @param string $uri * @return string */ public function frontControllerPath($sitePath, $siteName, $uri) { $_SERVER['SCRIPT_FILENAME'] = 'index.php'; $_SERVER['SCRIPT_NAME'] = ''; $_SERVER['PHP_SELF'] = '/index.php'; $_SERVER['PATH_INFO'] = $uri; return $sitePath.'/index.php'; } }

推荐:《最新的10个thinkphp视频教程》

Valet有没有为ThinkPHP5框架量身定制的驱动程序?
标签:驱动下面

本文共计320个文字,预计阅读时间需要2分钟。

Valet有没有为ThinkPHP5框架量身定制的驱动程序?

以下ThinkPHP框架教程栏目将给大家介绍关于Valet是否适合ThinkPHP5的驱动问题,希望对需要的朋友有所帮助!

Valet是否适合ThinkPHP5的驱动?觉得Valet的思路很好,所以采用了这个来作为驱动。

下面thinkphp框架教程栏目将给大家介绍关于valet是否有适合thinkphp5的驱动的问题,希望对需要的朋友有所帮助!

valet 有没有适合thinkphp5的驱动?

觉得valet的思路很好所以采用了这个来做环境。

公司里面用thinkphp的人比较多。所以要使用thinkphp。(而且我是弄前端的,后端用啥也不会特别在意)

github.com/curder/blog/blob/master/tools/valet_support_thinkphp.md

这是thinkphp3-valet的。

↓↓↓↓↓↓↓

自己简单写了一个现在试的可以用。

<?php class ThinkPHP5ValetDriver extends ValetDriver { /** * Determine if the driver serves the request. * * @param string $sitePath * @param string $siteName * @param string $uri * @return bool */ public function serves($sitePath, $siteName, $uri) { return true; } /** * Determine if the incoming request is for a static file. * * @param string $sitePath * @param string $siteName * @param string $uri * @return string|false */ public function isStaticFile($sitePath, $siteName, $uri) { if (file_exists($staticFilePath = $sitePath.$uri)) { return $staticFilePath; } return false; } /** * Get the fully resolved path to the application's front controller. * * @param string $sitePath * @param string $siteName * @param string $uri * @return string */ public function frontControllerPath($sitePath, $siteName, $uri) { $_SERVER['SCRIPT_FILENAME'] = 'index.php'; $_SERVER['SCRIPT_NAME'] = ''; $_SERVER['PHP_SELF'] = '/index.php'; $_SERVER['PATH_INFO'] = $uri; return $sitePath.'/index.php'; } }

推荐:《最新的10个thinkphp视频教程》

Valet有没有为ThinkPHP5框架量身定制的驱动程序?
标签:驱动下面