PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在

1、用phpstudy去进行本地开发,测试。

发现有时会出现如下错误,百思不得其解。

PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在

最后的解决办法是  只要用nts版php就会报此错误

乖乖下载php版本 非 nts版的,成功解决问题,php下地址如下,选择自己开发对应的版本

https://windows.php.net/downloads/releases/archives/

PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在

2、项目本地windows环境测试正常,传到linux系统就报错如下

PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在

最后发现,是linux下严格区分大小写,所以经常导致模板文件不存在

修改PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在

PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在

为index,首字母小写之后。完美解决问题。

也可以 控制器中解决,controller/index.php的index方法中,指定模板,fetch('Index/index');注意第一个Index首字母是大写。