Skip to content
This repository was archived by the owner on Dec 20, 2017. It is now read-only.

支持 PHP 项目的部署和本地调试#147

Merged
jysperm merged 1 commit intoleancloud:masterfrom
jysperm:php-runtime
May 16, 2016
Merged

支持 PHP 项目的部署和本地调试#147
jysperm merged 1 commit intoleancloud:masterfrom
jysperm:php-runtime

Conversation

@jysperm
Copy link
Contributor

@jysperm jysperm commented May 12, 2016

PHP builtin server 因为某种不得而知的原因不会将含有点(.)的 Url(而我们的 /1.1/functions 里面就有点)转发到 index.php,因此自己添加了一个 router.php 实现路由逻辑。

硬编码了一个 3000,因为参数不是很好传,不过感觉关系应该不大。

@juvenn
Copy link
Member

juvenn commented May 12, 2016

👍

  1. 我在本地用的是: php -S 127.0.0.1:3000 -t public public/index.php 来规避那个 . 的问题
  2. 在 linux 下面需要 php-cli 这个包,如果 php 找不到,要不要提醒一下用户呢?

@jysperm
Copy link
Contributor Author

jysperm commented May 12, 2016

  1. php -S 127.0.0.1:3000 -t public public/index.php 会把所有请求(包括静态文件)都转发到 index.php, 而我加的 rotuer.php 会先检查是否有对应的文件。
  2. 这个还是在文档上提示吧,PHP 的入门文档肯定会简单提一下如何在 Windows/Mac/Linux 安装环境的。

@juvenn
Copy link
Member

juvenn commented May 12, 2016

好的,我没有问题了。php 终于要出来了 😄

@sdjcw
Copy link
Contributor

sdjcw commented May 12, 2016

👍

@sdjcw
Copy link
Contributor

sdjcw commented May 16, 2016

硬编码了一个 3000,因为参数不是很好传,不过感觉关系应该不大。

意味着 -P 参数不能用了?先这样吧,后面有空重构下,尽量支持。

@jysperm jysperm merged commit af206c0 into leancloud:master May 16, 2016
@jysperm jysperm removed the review label May 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants