作为免责声明,我是应用程序开发新手。在
所以我一直在使用googleappengine和Python运行时环境开发这个网站。当我用HTML创建一个简单表单并决定使用PHP存储数据时,出现了一些问题。当我的应用程序在Python中运行时,允许我使用PHP脚本吗?在
我还注意到GAE现在有一个PHP运行时环境,那么我应该使用它吗?我使用Python只是因为它一开始很容易使用,而且我认为我不需要PHP。在
这就是我的main.py的样子,如果重要的话:import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
class MainHandler(webapp.RequestHandler):
def get (self, q):
if q is None:
q = 'index.html'
path = os.path.join (os.path.dirname (__file__), q)
self.response.headers ['Content-Type'] = 'text/html'
self.response.out.write (template.render (path, {}))
def main ():
application = webapp.WSGIApplication ([('/(.*html)?', MainHandler)], debug=True)
util.run_wsgi_app (application)
if __name__ == '__main__':
main ()