Home  >  Article  >  Backend Development  >  php后缀修改为inc代码怎么不执行

php后缀修改为inc代码怎么不执行

WBOY
WBOYOriginal
2016-06-20 12:41:211360browse

使用的是Apache服务器,本地一些如查询数据库代码,写在db_msql.inc文件里面,在服务器上面报错。没有找到方法,请问是否需要进行设置。


回复讨论(解决方案)

php 程序
include ‘db_mysql.inc';

看你服务器的解析设置,如果有个后缀名没有加解析,有的服务器是报错,有的是直接显示源码。

不过,.INC的文件,一般不直接执行的,都是被其他.PHP文件包含 使用的。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn