开发者

php library iPhone

I'm wondering if anyone knows of a PHP library that I could compile into my app for the iPhone? Basically I'm开发者_Python百科 wanting to allow the phone to display pages stored locally that have PHP in them and display them in a UIWebView.


Apple are extremely strict about not allowing 3rd-party code execution engines in apps, which would prohibit running a PHP interpreter.

If PHP is a true requirement, you'll have to host it on an external server and access the pages remotely.

Consider Javascript as an alternative language if you need to stay local, it's really the only way to execute run-time-generated code on the iPhone.


In order for that to work you would need:

  • A PHP compatible webserver running on your iPhone

  • Some sort of a PHP interpreter (not that there are so many different types of them out there) running on it too

I don't think this is/will be possible when thinking of Apple's strictness regarding 3rd party software and the low chances of someone even planning a port of PHP for the iPhone.


You mean like this PHP library? http://php.net/downloads.php


Running your debugged PHP code in an iOS app makes a lot of sense to me. Getting a PHP library in an iOS app and approved by Apple isn't easy, but it's been done. See: Running PHP on iOS? for details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜