简体   繁体   English

Google App Engine上的PHP

[英]PHP on the Google App Engine

How can i run a PHP script on the Google App Engine? 如何在Google App Engine上运行PHP脚本?

I know that Java and Python are supported. 我知道支持Java和Python。 Is PHP possible? PHP可能吗?

Google just announced this, and there is a public preview here. 谷歌刚刚宣布了这一点,这里有公开预览。 Works like a charm btw ! 像一个魅力btw工作! https://gaeforphp.appspot.com/ https://gaeforphp.appspot.com/

Yesterday I had a blog post published on the App Engine blog about how to get started with PHP on GAE: http://bit.ly/phpOnGAE 昨天我在App Engine博客上发布了一篇关于如何在GAE上开始使用PHP的博客文章: http//bit.ly/phpOnGAE

I'd love feedback and find out how to make it more helpful! 我喜欢反馈,并了解如何使它更有帮助!

The Google App Engine does not support php natively, even though it remains at the top of the wish list on the GAE issue tracker . Google App Engine本身不支持php,即使仍然位于GAE问题跟踪器的愿望列表顶部

However, you should be able to run php scripts using a Java implementation of PHP, such as Quercus . 但是,您应该能够使用PHP的Java实现来运行PHP脚本,例如Quercus You may want to check out the following article for further reading on the topic: 您可能需要查看以下文章以进一步阅读该主题:

用于App Engine的PHP现在处于有限预览版: https//developers.google.com/appengine/docs/php/

You can just about using Quercus but it's not a full implementation last time I checked. 可以使用Quercus,但上次检查时它并不是完整的实现。 It basically compiles your PHP down to Java and runs that through the Java Runtime. 它基本上将PHP编译为Java并通过Java Runtime运行它。

My opinion: it's a hack. 我的意见:这是一个黑客。 You'll probably find thing breaking and you'll probably have a really lousy experience with it. 你可能会发现破碎的事情,你可能会遇到很糟糕的经历。

But it might work for you so feel free to try it out. 但它可能对你有用,所以请随意尝试一下。

Php is not directly supported by App Engine. App Engine不直接支持Php。 But fortunately there is another way to use it with the help of Quercus which is pretty reliable. 但幸运的是,还有另一种方法可以在Quercus的帮助下使用它,这是非常可靠的。

Here are some step by step tutorials: Php on google app engine 以下是一些一步一步的教程: 谷歌应用引擎上的Php

Kind of. 的种类。 There is Quercus which runs PHP - or parts of PHP - in Java, and thus also on GAE. Quercus在Java中运行PHP或PHP的一部分,因此也在GAE上运行。

It seems however to be old (no updates since 2006), and it seems to be missing many functions. 然而它似乎是旧的(自2006年以来没有更新),它似乎缺少许多功能。 My impression: Meh. 我的印象:嗯。 It may be possible to run some PHP code on GAE with this, but it's definitely not a stable, full-blown basis to run production software on. 有可能在GAE上运行一些PHP代码,但它绝对不是运行生产软件的稳定,完整的基础。

More good background info: Is Quercus a viable replacement for PHP in Java environments? 更好的背景信息: Quercus是Java环境中PHP的可行替代品吗?

是的,您可以查看: http//php-apps.appspot.com获取教程和示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM