apache No input file specified
1.打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”
完整代码如下
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>
2. 修改根目录下的 .user.ini
把目录改成和域名对应
3.有可能是PHP(7.0以上需手动配)配置文件没有配目录,找到配置文件,搜索open_basedir
果然在open_basedir下没有新建网站的目录。注意一下“open_basedir=”后面的路径是用 : 来分隔,所以在最后加上":/home/jiaoyou/loupan"这个路径,重启PHP,再次测试,正常打开网站。
参考使用宝塔创建PHP网站,出现"no input file specified"怎么办? - 知乎
shell_exec() has been disabled for security reasons
解决办法:
打开php.ini,搜索disable_functions,代码如下:
disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status, ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru, stream_socket_server,fsocket,fsockopen
把shell_exec删除即可,保存。
手机端页面不放大
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
宝塔修改默认后缀优先级(解决index.php和index.html优先级问题)