开发者

Does the iphone have a local webserver or can I download a third party one?

开发者 https://www.devze.com 2023-02-06 21:17 出处:网络
Doe开发者_如何学编程s the iphone have a local webserver or can I download a third party one?Apple does not allow any third party codeinterpreters or environments to be installed on iOS, so if you want

Doe开发者_如何学编程s the iphone have a local webserver or can I download a third party one?


Apple does not allow any third party codeinterpreters or environments to be installed on iOS, so if you want to run PHP, Python, Ruby or a similar language, you are out of luck. If you are just trying to parse and display HTML and CSS, then you should use the UIWebView object. UIWebView class reference: http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html


If you use a UIWebView, you should be able to simply pass the requisite file/html to it.


Jailbreak your iPhone and then you can install Apache pretty easily. PHP is also in the repositories as well if you want to run webapps or something else.

See: http://idude.org/2007/11/07/an-iphone-powered-apache-web-server-with-php/

For a more basic setup that does not require you to jailbreak, there is software called ServersMan: http://itunes.apple.com/app/serversman/id302133974?mt=8
I believe this is one of those apps that runs a HTTP/WebDAV server to act as a "USB stick" for transferring files.


If you are on a Mac, just use the built in Apache and your /Sites folder. Otherwise, run a simple web framework like Sinatra or Rails.

0

精彩评论

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