Home  >  Article  >  Backend Development  >  解析PHP程序在Windows Azure内如何运行_PHP教程

解析PHP程序在Windows Azure内如何运行_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:39:39793browse

  PHP是一种非常流行的,主要用于处理动态网页的脚本语言。PHP用户对于能在Windows Azure平台内运行PHP应用必定会感到惊喜。

  我们知道,微软Windows Azure平台相较与其他云计算平台的优势之一便在于其拥有便利的开发工具和熟悉的编程语言的先天优势。

  下面我们就来看看,在Windows Azure内运行PHP应用是多么的简单和轻松。

  前置条件:

  PHP

  IIS 7 (开启 ASP.NET, WCF HTTP Activation)

  Microsoft Visual Studio 2008 SP1 (或更高)

  Windows Azure Tools for Microsoft Visual Studio (June 2010)

  代码:

  1.首先,我们从http://windows.php.net/download/ 处下载非线程安全的最新版PHP.

  笔者下载的是VC9 x86 Non Thread Safe (2010-Mar-04 20:11:07)版本。在下载页的侧边栏,我们可以看到VC6和VC9版本的差别,VC6版是用Visual Studio 6编译器编译的,而VC9版本是Visual Studio 2008编译器编译的,性能和稳定性都有提高。至于线程安全与非线程安全的区别在于Windows 操作系统采用多线程架构,而Linux和Unix采用多进程架构。

  2.打开Visual Studio,新建项目->Visual C#->Cloud->Windows Azure Cloud Service。输入项目名称CloudService1,之后点击OK。

  

\

 

  添加CGI_Web Role,重命名为PHP_WebCgiRole。点击ok。

  

\

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486298.htmlTechArticlePHP是一种非常流行的,主要用于处理动态网页的脚本语言。PHP用户对于能在Windows Azure平台内运行PHP应用必定会感到惊喜。 我们知道,微软...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn