duanjiaolao1187 2009-01-20 09:35
浏览 95
已采纳

扩展PHP5在XAMPP中不解析

I've installed XAMPP Apache server and put my website into htdocs. I've started Apache server. On my website I've got files with extension PHP and with extension PHP5.The difference is that when I type in into browser localhost/file.php - I see a parsed website.

But when I type localhost/file.php5 (i have this file on server), than browser asks me if I want to download or open this file. And if I choose open than I see PHP code of file.php5!

I've looked into configuration, so:

  1. I dont have htaccess file
  2. PHPINFO() shows PHP 5
  3. c:\xampp\apache\conf\extra\httpd-xampp is included into configuration and has this on the beginning:

    AddType application/x-httpd-php-source .phps

    AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt

I've tried also to put:

AddHandler php5-script .php5
AddType text/html .php5

Into httpd.conf, but it does not work for me (no changes).

Could you please help me fixing it? I would like to have php5 and php extension files to be opened with php5 parser.

  • 写回答

4条回答 默认 最新

  • dsg56465 2009-01-28 07:59
    关注

    XAMPP passes by default files with the following extensions to PHP: .php .php5 .php4 .php3 .phtml .phpt (this was tested with XAMPP Lite 1.6.8).

    My suggestion would be to remove the "AddType text/html .php5" line from the XAMPP configuration. Alternatively, use a clean install of XAMPP and look at the differences (with something like WinMerge).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘