Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThinkPHP错误 #3

Open
threetown opened this issue Aug 30, 2018 · 0 comments
Open

ThinkPHP错误 #3

threetown opened this issue Aug 30, 2018 · 0 comments

Comments

@threetown
Copy link
Contributor

threetown commented Aug 30, 2018

variable type error: array

  • 错误:variable type error: array
  • 原因:TP5访问控制器,不能用return直接返回数组。
  • 解决方案:用json() 函数返回
  • 参考:variable type error

No input file specified.

  • 错误:No input file specified.
  • 原因:public目录下的 .htaccess 修改 RewriteRule ^(.)$ index.php/$1 [QSA,PT,L]RewriteRule ^(.)$ index.php?/$1 [QSA,PT,L]
  • 参考:URL访问路由定义

未定义数组索引: keyword

image

  • 报错:$queryKeyword = $this->param['keyword'];
  • 修复:$queryKeyword = isset($this->param['keyword']) ? $queryKeyword : '';
  • 参考: isset()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant