在 Windows 下面从源代码编译 PHP 的步骤
window|编译|源代码
Building from source
从源代码建立
Before getting started, it is worthwhile answering the question: "Why is building on Windows so hard?" Two reasons come to
mind:
在开始前,我们来回答一个问题:“为什么在 Windows 下编译 php 如此困难?“,2个注意的原因是:
Windows does not (yet) enjoy a large community of developers who are willing to freely share their source. As a direct
result, the necessary investment in infrastructure required to support such development hasnt been made. By and large, what
is available has been made possible by the porting of necessary utilities from Unix. Dont be surprised if some of this
heritage shows through from time to time.
Windows 不是一个大量愿意免费共享他们代码的开发团体。直接导致支持这些开发的基础投资没有建立,而Unix 可能已经建立了。
Pretty much all of the instructions that follow are of the "set and forget" variety. So sit back and try follow the
instructions below as faithfully as you can.
下面的大多数好东西是"set and forget".所以请尽可能严格按照下面的步骤进行。
Preparations
Before you get started, you have a lot to download....
准备:
在开始前,你需要下载许多东西!!
For starters, get the Cygwin toolkit from the closest Cygnus mirror site. What you are looking for is cygwin.exe file. This
will provide you most of the popular GNU utilities used by the build process.
http://sources.redhat.com/cygwin/download.html
开始,从最近的 Cygnus 的镜像站点获取 Cygwin 工具箱。你要找的是 cygwin.exe 文件。他提供了大多数流行的 GNU 工具用于编译过程:
Download the rest of the build tools you will need from the PHP site at http://www.php.net/extra/win32build.zip.
下载其他的编译需要的工具,从 php 的站点:
Get the source code for the DNS name resolver used by PHP at http://www.php.net/extra/bindlib_w32.zip. This is a replacement
for the resolv.lib library included in win32build.zip.
获得 PHP 使用的用于 DNS 名字解析的源代码。替换 win32build.zip 里面的 resolv.lib 文件
If you dont already have an unzip utility, you will need one. A free version is available from InfoZip.
如果你没有解压缩工具,你需要下载一个。 InfoZip 有一个免费的!!
Finally, you are going to need the source to PHP 4 itself. You can get the latest development version using anonymous CVS. If
you get a snapshot or a source tarball, you not only will have to untar and ungzip it, but you will have to convert the bare
linefeeds to crlfs in the *.dsp and *.dsw files before Microsoft Visual C++ will have anything to do with them.
最后,你需要 PHP 的源代码本身。你可以使用匿名 CVS 获得最新的开发版本。如果你得到的是一个 snapshot 或者一个源代码 tarball, 你
不仅需要展开它, 而且在 Microsoft Visual C++ 可以处理所有东西前,你需要转换在 *.dsp 和 *.dws 文件里的空的换行符为回车换行符号
!
Note: Place the Zend and TSRM directories inside the php4 directory in order for the projects to be found during the build
process.
注意:放置 Zend 和 TSTM 目录在 php4 目录里面,使得工程在建立期间可以找到他们
Putting it all together
把他们放在一起
Follow the instructions for installing the unzip utility of your choosing.
按照下面的步骤来安装你选择的展开系统
Execute cygwin.exe and follow the installation instructions. If you choose to install to a path other than c:cygnus, let the
build process know by setting the Cygwin environment variable. On Windows 95/98 setting an environment variable can be done
by placing a line in your autoexec.bat. On Windows NT, go to My Computer => Control Panel => System and select the
environment tab.
运行 cygwin.exe,按照安装步骤进行。如果你选择安装到一个不是 C:cygnus 的路径,必须通过设置 cygwin 环境变量通知建立程序。在
Windows 95/98 下,设置环境变量可以通过在 Autoexec.bat 里加入一行来做到!在 Window NT,打开 我的电脑 => 系统 然后选择化镜变量标
签。
Warning
Make a temporary directory for Cygwin to use, otherwise many commands (particularly bison) will fail. On Windows 95/98, mkdir
C:TMP. For Windows NT, mkdir %SystemDrive%tmp.
警告:
建立一个 Cygwin使用的临时目录。否则许多命令(特别是 bison)会失败。在 Windows 95/98 下,建立目录 mkdir c:tmp, 在 Windows NT
下 mkdir %SystemDrive%tmp。
Make a directory and unzip win32build.zip into it.
建立一个目录,展开 win32build.zip 到里面
Launch Microsoft Visual C++, and from the menu select Tools => Options. In the dialog, select the directories tab.
Sequentially change the dropdown to Executables, Includes, and Library files, and ensure that cygwinbin, win32buildinclude,
and win32buildlib are in each list, respectively. (To add an entry, select a blank line at the end of the list and begin
typing). Typical entries will look like this:
运行 Microsoft Visual C++,从菜单里选择 Tools => Option. 在对话框里,选择 Directories(路径) 标签.向下移动到 Executables(可执
行), Includes(包含文件), 和 Library(库文件) 文件处,确认 cygwinbin,win32buildinclude,和win32buildlib 分别在每个列表里面。(
要增加一个入口,先则列表尾部的空行,然后敲入).典型的结果如下:
c:cygnusbin
c:php-win32buildinclude
c:php-win32buildlib
Press OK, and exit out of Visual C++.
按 OK 键。退出 Visual C++
Make another directory and unzip bindlib_w32.zip into it. Decide whether you want to have debug symbols available (bindlib -
Win32 Debug) or not (bindlib - Win32 Release). Build the appropriate configuration:
建立另外一个目录,展开 blindlib_w32.zip 到里面。确定是否你想要调试符号。建立恰当的配置。
For GUI users, launch VC++, and then select File => Open Workspace and select bindlib. Then select Build=>Set Active
Configuration and select the desired configuration. Finally select Build=>Rebuild All.
对于 GUI 用户,运行 VC++, 选择 File => open Workspace, 然后选择 bindlib. 然后选择 Build=>Set Active Configuration ,选择想要的
配置。最后选择 Build => Rebuild All.
For command line users, make sure that you either have the C++ environment variables registered, or have run vcvars.bat, and
then execute one of the following:
对于命令行用户,确认你已经注册 C++环境变量或者已经运行了 vcvars.bat.然后运行下面的任何一个
msdev bindlib.dsp /MAKE "bindlib - Win32 Debug"
msdev bindlib.dsp /MAKE "bindlib - Win32 Release"
At this point, you should have a usable resolv.lib in either your Debug or Release subdirectories. Copy this file into your
win32buildlib directory over the file by the same name found in there.
这时,你获得一个可用的 resolv.lib 在你的 Debug 或者 Release 子目录下面。复制这个文件到你的 win32buildlib 目录,覆盖那里的同
名的文件。
Compiling
编译
The best way to get started is to build the standalone/CGI version.
开始最好建立独立/CGI版本
For GUI users, launch VC++, and then select File => Open Workspace and select php4ts. Then select Build=>Set Active
Configuration and select the desired configuration. Finally select Build=>Rebuild All.
对于 GUI 用户,运行 VC++,选择 File => Open Workspace 选择 php4ts,然后选择 Build => Set Active Configuration, 选择想要的配置。
最后选择 Build => Rebuild All.
For command line users, make sure that you either have the C++ environment variables registered, or have run vcvars.bat, and
then execute one of the following:
对于命令行用户,确认你已经注册 C++环境变量或者已经运行了 vcvars.bat.然后运行下面的任何一个
msdev php4ts.dsp /MAKE "php4ts - Win32 Debug_TS"
msdev php4ts.dsp /MAKE "php4ts - Win32 Release_TS"
At this point, you should have a usable php.exe in either your Debug_TS or Release_TS subdirectories.
这时,你可以得到可用的 php.exe 在你的 Debug_TS 或者 Release_TS 子目录下面。
Repeat the above steps with php4isapi.dsp (which can be found in sapiisapi) in order to build the code necessary for
integrating PHP with Microsoft IIS.
对于 phpisapi.dsp 重复上面的步骤(在 sapiisapi 里面可以找到).建立 Microsoft IIS 的 isapi 程序.

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











PHP 8.4는 상당한 양의 기능 중단 및 제거를 통해 몇 가지 새로운 기능, 보안 개선 및 성능 개선을 제공합니다. 이 가이드에서는 Ubuntu, Debian 또는 해당 파생 제품에서 PHP 8.4를 설치하거나 PHP 8.4로 업그레이드하는 방법을 설명합니다.

VS Code라고도 알려진 Visual Studio Code는 모든 주요 운영 체제에서 사용할 수 있는 무료 소스 코드 편집기 또는 통합 개발 환경(IDE)입니다. 다양한 프로그래밍 언어에 대한 대규모 확장 모음을 통해 VS Code는

숙련된 PHP 개발자라면 이미 그런 일을 해왔다는 느낌을 받을 것입니다. 귀하는 상당한 수의 애플리케이션을 개발하고, 수백만 줄의 코드를 디버깅하고, 여러 스크립트를 수정하여 작업을 수행했습니다.

이 튜토리얼은 PHP를 사용하여 XML 문서를 효율적으로 처리하는 방법을 보여줍니다. XML (Extensible Markup Language)은 인간의 가독성과 기계 구문 분석을 위해 설계된 다목적 텍스트 기반 마크 업 언어입니다. 일반적으로 데이터 저장 AN에 사용됩니다

JWT는 주로 신분증 인증 및 정보 교환을 위해 당사자간에 정보를 안전하게 전송하는 데 사용되는 JSON을 기반으로 한 개방형 표준입니다. 1. JWT는 헤더, 페이로드 및 서명의 세 부분으로 구성됩니다. 2. JWT의 작업 원칙에는 세 가지 단계가 포함됩니다. JWT 생성, JWT 확인 및 Parsing Payload. 3. PHP에서 인증에 JWT를 사용하면 JWT를 생성하고 확인할 수 있으며 사용자 역할 및 권한 정보가 고급 사용에 포함될 수 있습니다. 4. 일반적인 오류에는 서명 검증 실패, 토큰 만료 및 대형 페이로드가 포함됩니다. 디버깅 기술에는 디버깅 도구 및 로깅 사용이 포함됩니다. 5. 성능 최적화 및 모범 사례에는 적절한 시그니처 알고리즘 사용, 타당성 기간 설정 합리적,

문자열은 문자, 숫자 및 기호를 포함하여 일련의 문자입니다. 이 튜토리얼은 다른 방법을 사용하여 PHP의 주어진 문자열의 모음 수를 계산하는 방법을 배웁니다. 영어의 모음은 A, E, I, O, U이며 대문자 또는 소문자 일 수 있습니다. 모음이란 무엇입니까? 모음은 특정 발음을 나타내는 알파벳 문자입니다. 대문자와 소문자를 포함하여 영어에는 5 개의 모음이 있습니다. a, e, i, o, u 예 1 입력 : String = "Tutorialspoint" 출력 : 6 설명하다 문자열의 "Tutorialspoint"의 모음은 u, o, i, a, o, i입니다. 총 6 개의 위안이 있습니다

정적 바인딩 (정적 : :)는 PHP에서 늦은 정적 바인딩 (LSB)을 구현하여 클래스를 정의하는 대신 정적 컨텍스트에서 호출 클래스를 참조 할 수 있습니다. 1) 구문 분석 프로세스는 런타임에 수행됩니다. 2) 상속 관계에서 통화 클래스를 찾아보십시오. 3) 성능 오버 헤드를 가져올 수 있습니다.

PHP의 마법 방법은 무엇입니까? PHP의 마법 방법은 다음과 같습니다. 1. \ _ \ _ Construct, 객체를 초기화하는 데 사용됩니다. 2. \ _ \ _ 파괴, 자원을 정리하는 데 사용됩니다. 3. \ _ \ _ 호출, 존재하지 않는 메소드 호출을 처리하십시오. 4. \ _ \ _ get, 동적 속성 액세스를 구현하십시오. 5. \ _ \ _ Set, 동적 속성 설정을 구현하십시오. 이러한 방법은 특정 상황에서 자동으로 호출되어 코드 유연성과 효율성을 향상시킵니다.
