duanjia7607 2013-11-21 10:28
浏览 49

apache2和php5-fpm,如何正确处理* .phps文件?

I've setup my server using apache2 and php5-fpm, pretty much like in this guide: http://www.versatilewebsolutions.com/blog/2012/11/installing-apache-2-with-php-fastcgi-on-ubuntu-12-10.html

The only question left is, how can I configure it to correctly process the *.phps files? I want to show the highlighted code of them.

There are guides for nginx and php-fpm ( https://blog.kamalnasser.net/post/highlighting-phps-files-in-nginx/ ), but what should we do with apache2 ?

  • 写回答

2条回答 默认 最新

  • dou4064 2013-11-21 10:32
    关注

    This should do it:

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

    Add it to your apache config file. There should be a similar line like this:

    AddType application/x-httpd-php .php
    

    So just add it below.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?