dsgs8208 2013-10-09 12:54
浏览 27
已采纳

App Engine下载.PHP文件

My Wordpress site's theme on PHP App Engine contains a .css.php file. On normal hosting, when you navigate to the url of this file, the browser displays a page of CSS. On App Engine, the browser downloads the PHP file.

I would guess this is a problem with app.yaml - but specifically, what is going on?

  • 写回答

2条回答 默认 最新

  • douhang5460 2013-10-10 14:13
    关注

    Here are the changes I made to the Google tutorial's app.yaml to fix the Wordpress install:

    handlers:
    - url: /wp-content/themes/fuse/library/css/custom.css.php
      script: wordpress/wp-content/themes/fuse/library/css/custom.css.php
    
    - url: /(.*\.(htm$|html$|css$|js$|ttf$|jpg$|jpeg$|otf$|woff$|svg$))
      static_files: wordpress/\1
      upload: wordpress/(.*\.(htm$|html$|css$|js$|ttf$|jpg$|jpeg$|otf$|woff$|svg$))
      application_readable: true
    
    - url: /wp-content/(.*\.(ico$|jpg$|png$|gif$|ttf$|jpeg$|htm$|html$|css$|js$|otf$|woff$|svg$))
      static_files: wordpress/wp-content/\1
      upload: wordpress/wp-content/(.*\.(ico$|jpg$|png$|gif$|ttf$|jpeg$|htm$|html$|css$|js$|otf$|woff$|svg$))
      application_readable: true
    
    - url: /(.*\.(ico$|jpg$|png$|gif$|ttf$|jpeg$|htm$|html$|css$|js$|otf$|woff$|svg$))
      static_files: wordpress/\1
      upload: wordpress/(.*\.(ico$|jpg$|png$|gif$|ttf$|jpeg$|htm$|html$|css$|js$|otf$|woff$|svg$))
    

    I just enabled a few more types of static files (like otf and svg) and allowed a PHP file in the theme to run as a script rather than download as a static file.

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

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度