解析PHP程序在Windows Azure内如何运行
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。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.