Iphone objective c中的web服务
我们可以在目标c中编写web服务吗?请帮助我,我很困惑是的,我们可以!您只需使用Iphone objective c中的web服务,iphone,objective-c,xcode,web-services,Iphone,Objective C,Xcode,Web Services,我们可以在目标c中编写web服务吗?请帮助我,我很困惑是的,我们可以!您只需使用printf和CGI即可。(就像您使用Python、Ruby、Perl、PHP、Shell脚本、Malbolge等所做的一样) 例如: #include <stdio.h> int main() { printf("Content-Type: text/html\n\r"); printf("\n\r"); printf("<h1>Hello, world!</h1>
printf
和CGI即可。(就像您使用Python、Ruby、Perl、PHP、Shell脚本、Malbolge等所做的一样)
例如:
#include <stdio.h>
int main() {
printf("Content-Type: text/html\n\r");
printf("\n\r");
printf("<h1>Hello, world!</h1>");
return 0;
}
有关如何启用CGI的信息,请参阅web服务器的文档
或者你可以用Objective-C编写一个服务器,这并不难。:我们应该在mac上托管,或者也可以在windows系统上托管???@sujay你当然也可以在windows服务器上托管,但你需要为windows编译。请注意,Fund不适用于Apple的Windows,但可以使用(它是一个开源端口)。
$ clang *.m -isysroot /Developer/SDKs/MacOSX10.7.sdk
$ mv a.out index.cgi