此问题出现在.htaccess上
Apache按如下代码修改即可:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [L]
Nginx按如下代码修改即可:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
Apache与Nninx与的区别在于,Apache的index.php后多了一个?
 
2018年10月15日 16:52:48再次编辑本文:
使用如下方式在nginx和apache下都可以使用:
RewriteEngine on
# 如果是一个目录或者文件,就访问目录或文件
RewriteCond %{REQUEST_FILENAME} !-d
# 如果文件存在,就直接访问文件,不进行下面的RewriteRule
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php

  

  

php框架路由美化后提示No input file specified的更多相关文章

  1. 解决 php 报错 open_basedir restriction in effect或者nginx提示No input file specified怎么办

    解决 php 报错 open_basedir restriction in effect或者nginx提示No input file specified怎么办 问题是出现在了PHP.INI上面了 ,原 ...

  2. Dreamhost 提示No input file specified. 的解决的方法

    假设开启FastCGI模式,.htaccess无法生效,一直提示no input file specified. 由于在Fastcgi模式下.php不支持rewrite的目标网址的PATH_INFO的 ...

  3. TP5使用路由模式报错 No input file specified.

    热烈推荐:超多IT资源,尽在798资源网 application/route.php 是设置路由的文件. 将 route.php 代码修改为 <?php use think\Route; Ro ...

  4. 64位Ubuntu14.04配置adb后提示No such file or directory

    配置好SDK的环境变量后,输入adb提示 No such file or directory. 原因:由于是64位的linux系统,而Android SDK只有32位的,需要安装一些支持包才能使用 1 ...

  5. 提示No input file specified的解决方法

    (一)IIS Noinput file specified 方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS 方法二: 请修改php.ini 找到 ; cgi. ...

  6. onethink 重写URL后,apache提示No input file specified

    <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{RE ...

  7. thinkPHP 出现route不起作用提示No input file specified.

    修改.htaccess文件 原因在于使用的PHP是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误. 打开.htaccess 在RewriteRule 后面的index ...

  8. nginx提示No input file specified怎么办

    用了网上提供的各种方法都不行,即便html能正常打开,php文件依然有问题.而后继续尝试了修改权限 chown -vR www:www /folder 功能都正常. nginx.conf 的 user ...

  9. nginx no input file specified

    今天在lnmp上调试php项目,之前已经在上面测试过tp5框架,可以正常访问.但是新项目由于项目中有些路径是写固定路径的.为了不去修改代码.配置新项目的时候,为新项目设置新的目录.问题就出现了,网页提 ...

随机推荐

  1. GIT删除本地tag和远程tag

    以tag test为例,这个tag已经同步到远程,但是现在发现了一个问题,需要撤回该tag,git命令如下: 删除本地tag: git tag -d test 删除远程tag: git push or ...

  2. 【Layui】 layui表单必填项带*样式

    直接上代码 .layui-form-label.layui-required:after{ content:"*"; color:red; position: absolute; ...

  3. mockito的用法

    well,说来惭愧,之前一直知道有这么个东西,但总是看不进去.刚好趁着这次迭代间隙有些闲暇,认真看了下,大概明白是怎么回事了. 首先,mock是个概念,这个词的本意就是“虚假的”.“模仿的”.在测试的 ...

  4. Classic BAdi and New BAdi

    Former Member Classic BAdi and New BAdi ... 2007年04月27日 04:43 | 1.5k Views Hi all, I have a question ...

  5. [No000019A]IDEA 设置手册

    [No000019A]idea设置手册.rar IDEA 设置手册 IDEA 设置手册 plugin lgnore files and folesrs 代码管控 程序框架 部署方式 useless 3 ...

  6. socks5 代理服务器ss5配置

    安装 yum install pam-devel openldap-devel openssl-devel yum -y install gcc automake make pam-devel ope ...

  7. git对某个文件取消跟踪

    git rm --cached readme1.txt    删除readme1.txt的跟踪,并保留在本地. git rm --f readme1.txt    删除readme1.txt的跟踪,并 ...

  8. 【转帖】Hadoop — HDFS的概念、原理及基本操作

    Hadoop — HDFS的概念.原理及基本操作 https://www.cnblogs.com/swordfall/p/8709025.html 分类: Hadoop undefined 1. HD ...

  9. Java开发笔记(一百五十一)Druid连接池的用法

    C3P0连接池自诞生以来在Java Web领域反响甚好,业已成为hibenate框架推荐的连接池.谁知人红是非多,C3P0在大型应用场合中暴露了越来越多的局限性,包括但不限于下列几点:1.C3P0管理 ...

  10. HLP帮助文件源文件RTF文件的编写

    https://www.cnblogs.com/gaodu2003/archive/2008/12/17/1356861.html 举例说明如下: 每一节的标题在RTF文件中一般以特有的脚注($)指定 ...