一. 成为一个合格的项目经理的必备素质
1. 非常好的项目的需求分析能力,能够准确的把握一个项目的需求,并且而且分析出一个项目中客户需求的真正意图。
这个素质是能否成为一个合格的项目经理的前提条件,只有一个头脑清晰,并且能够明确的知道客户的诉求的项目经理,才能做出一个客户需要的项目或产品,并且只有一个对需求把握十分的准确的项目经理才有可能制订出一个合理的计划来,所以这个时项目经理最需要的素质,如果没有这项素质基本上不会成为一个合格的项目经理
2. 沟通能力
沟通能力分为两部分,一部分是需要表达清楚自己做的事情,很清晰的阐述自己的观点,第二部分是正确的理解别人所诉述的事情,准确无误的明白别人的意思。
作为一个项目经理沟通是必不可少的,时常需要与客户打交道,并且还需要指挥程序员,而且还经常需要与横向部门进行沟通,索取必备的资源等,但是现实生活中的大多数人只具备其中的一项,倾听或者表达,真正达到有效沟通的人员并不多。
3. 能够深刻的认知每一个人优缺点,发挥每一个人的特长
能够清晰的分析每一个人的优缺点是一个小企业或技术未定型的企业中的项目经理必备的素质,因为只有这样才能为每一个人合理的分配工作,并且也能够因此而制订出有效的激励制度,所以在依赖于个人能力的公司中,这点非常重要,人员如果能够分配得当将是一个项目成功的关键步骤。
4. 非常强的责任心,敢于承担责任,做事注重细节
非常强的责任心,能够保证一个项目总能够平稳的发展,而不至于在最后出现重大的难以解决的问题,是一个没有质量保证(qa)部门为前提下,一个公司能够确保项目顺利实施的项目经理必备的素质,所以这点非常重要。
二. 项目经理的职责(小公司及技术未成型企业适用)
1. 制订合理的项目计划
能够综合程序员的水平,客户的需求,规划一个合理的项目计划,并且设置一些合理的里程碑点。
2. 制订有效的开发模式
根据项目规模经验等,制订出最符合公司利益的开发模式,比如瀑布模型或者是敏捷模型等。
3. 能够比较精确的衡量项目的成本,进度,质量等
4. 风险管理,有较强的风险意识
能够准确的指导项目的风险,及早的排查风险,需要很强的风险意识
5. 确定合适的项目开发人员
这点是在有条件的情况下,找到合适的程序员去开发程序。
6. 为项目成员争取足够的资源,并且能够有效地管理项目资源
充分的为项目其他成员服务,得到合理的管理资源
7. 能够寻找有效的激励制度
2009年4月13日星期一
2009年1月23日星期五
DNS服务器配置实例
配置DNS的实例:
1 所需配置文件:
/etc/named.conf 系统自带,需要配置
/etc/resolv.conf 系统自带,需要配置
/var/named/myqmail.com.db 系统没有,自已创建
/var/named/db.192.168.0.198 系统没有,自已创建
/var/named/named.local 系统自带,不需要修改
/var/named/named.ca 系统自带,不需要修改
2 相关工具
nslookup
说明:检测DNS是否配置正确的工具,系统自带。
3 配置方案
3.1 /etc/named.conf
说明:DNS主配置文件,定义了域数据库信息的基本参数和源点,该文件可以存放在本地或远程的服务器上。源文件:
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "myqmail.com" IN {
type master;
file "myqmail.com.db";
allow-update { none;};
};
zone "0.168.192.in-addr.arpa" IN{
type master;
file "db.192.168.0.198";
allow-update { none;};
};
include "/etc/rndc.key";
3.2 /var/named/myqmail.com.db
说明:正向解析配置文件,即实现域名到IP的对应。源文件:
$TTL 86400
@ IN SOA www.myqmail.com. myqmail.com. (
2002103000 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS www.myqmail.com.
localhost IN A 127.0.0.1
www IN A 192.168.0.198
3.3 /var/named/db.192.168.0.198
说明:DNS反向解析配置文件,即实现IP地址很域名的映射。源文件:
$TTL 86400
@ IN SOA www.myqmail.com. myqmail.com. (
2002103000 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS www.myqmail.com.
198 IN PTR www.myqmail.com.
3.4 /etc/resolv.conf
说明:指定域名服务器的IP和搜索顺序。源文件:
search myqmail.com
nameserver 192.168.0.198
4 测试及管理办法
4.1 测试方法
1. 修改完DNS的配置文件,需要执行/etc/rc.d/init.d/named restart来使更改生效。
2. nslookup:测试正向、反向的解析是否正常
5 小结
DNS服务是许多服务的基础,所以我刚开始linux服务器时,就着手配置DNS服务器。DNS是用在局域网中,不连接Internet,仅仅限于局域网中为各个部门的各主机及服务器作解析用。
1 所需配置文件:
/etc/named.conf 系统自带,需要配置
/etc/resolv.conf 系统自带,需要配置
/var/named/myqmail.com.db 系统没有,自已创建
/var/named/db.192.168.0.198 系统没有,自已创建
/var/named/named.local 系统自带,不需要修改
/var/named/named.ca 系统自带,不需要修改
2 相关工具
nslookup
说明:检测DNS是否配置正确的工具,系统自带。
3 配置方案
3.1 /etc/named.conf
说明:DNS主配置文件,定义了域数据库信息的基本参数和源点,该文件可以存放在本地或远程的服务器上。源文件:
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "myqmail.com" IN {
type master;
file "myqmail.com.db";
allow-update { none;};
};
zone "0.168.192.in-addr.arpa" IN{
type master;
file "db.192.168.0.198";
allow-update { none;};
};
include "/etc/rndc.key";
3.2 /var/named/myqmail.com.db
说明:正向解析配置文件,即实现域名到IP的对应。源文件:
$TTL 86400
@ IN SOA www.myqmail.com. myqmail.com. (
2002103000 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS www.myqmail.com.
localhost IN A 127.0.0.1
www IN A 192.168.0.198
3.3 /var/named/db.192.168.0.198
说明:DNS反向解析配置文件,即实现IP地址很域名的映射。源文件:
$TTL 86400
@ IN SOA www.myqmail.com. myqmail.com. (
2002103000 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS www.myqmail.com.
198 IN PTR www.myqmail.com.
3.4 /etc/resolv.conf
说明:指定域名服务器的IP和搜索顺序。源文件:
search myqmail.com
nameserver 192.168.0.198
4 测试及管理办法
4.1 测试方法
1. 修改完DNS的配置文件,需要执行/etc/rc.d/init.d/named restart来使更改生效。
2. nslookup:测试正向、反向的解析是否正常
5 小结
DNS服务是许多服务的基础,所以我刚开始linux服务器时,就着手配置DNS服务器。DNS是用在局域网中,不连接Internet,仅仅限于局域网中为各个部门的各主机及服务器作解析用。
2008年12月30日星期二
php对gzip文件或者字符串解压实例参考
要采集一个网站,目标站采用了gzip压缩传输网页,本来应该只要发送一个http头 Accept-Encoding: identity或者干脆不发送这个头等,就可以使目标站返回没有经过gzip压缩的页面了,不过很不幸,目标站无视客户端的请求,仍然返回gzip数据,造成乱码。
其实php对gzip解压很简单,用内置的gzdecode函数就可以了,不过很可惜我配置了半天也无法支持gzdecode函数,所以只好变通一下:
以下为引用的内容:
if (!function_exists('gzdecode')) {
function gzdecode ($data) {
$flags = ord(substr($data, 3, 1));
$headerlen = 10;
$extralen = 0;
$filenamelen = 0;
if ($flags & 4) {
$extralen = unpack('v' ,substr($data, 10, 2));
$extralen = $extralen[1];
$headerlen += 2 + $extralen;
}
if ($flags & 8) // Filename
$headerlen = strpos($data, chr(0), $headerlen) + 1;
if ($flags & 16) // Comment
$headerlen = strpos($data, chr(0), $headerlen) + 1;
if ($flags & 2) // CRC at end of file
$headerlen += 2;
$unpacked = @gzinflate(substr($data, $headerlen));
if ($unpacked === FALSE)
$unpacked = $data;
return $unpacked;
}
}
调用方法很简单:
以下为引用的内容:
$f=@file_get_contents("http://www.biuuu.cn");
echo gzdecode($f);
其实php对gzip解压很简单,用内置的gzdecode函数就可以了,不过很可惜我配置了半天也无法支持gzdecode函数,所以只好变通一下:
以下为引用的内容:
if (!function_exists('gzdecode')) {
function gzdecode ($data) {
$flags = ord(substr($data, 3, 1));
$headerlen = 10;
$extralen = 0;
$filenamelen = 0;
if ($flags & 4) {
$extralen = unpack('v' ,substr($data, 10, 2));
$extralen = $extralen[1];
$headerlen += 2 + $extralen;
}
if ($flags & 8) // Filename
$headerlen = strpos($data, chr(0), $headerlen) + 1;
if ($flags & 16) // Comment
$headerlen = strpos($data, chr(0), $headerlen) + 1;
if ($flags & 2) // CRC at end of file
$headerlen += 2;
$unpacked = @gzinflate(substr($data, $headerlen));
if ($unpacked === FALSE)
$unpacked = $data;
return $unpacked;
}
}
调用方法很简单:
以下为引用的内容:
$f=@file_get_contents("http://www.biuuu.cn");
echo gzdecode($f);
PHP 构建语义 Web CRUD 操作
创建、读、更新和删除(Create/Read/Update/Delete,CRUD)操作是最基本的数据库操作,但是它们也是最重要的操作。 CRUD 操作通常是使用关系数据库系统中的结构化查询语言(Structured Query Language,SQL)完成的。随着 Web 变得更加具有面向数据特性,因此需要从基于 SQL 的 CRUD 操作转移到基于语义 Web 的 CRUD 操作。了解如何使用 PHP 通过基于语义的 Web 执行 CRUD 操作。 常用缩写词
API — 应用程序编程接口(Application Programming Interface)
CRUD — 创建/读/更新/删除(Create/Read/Update/Delete)
HTTP — 超文本传输协议(Hypertext Transfer Protocol)
MVC — 模式—视图—控制器(Model-View-Controller)
OOP — 面向对象的编程(Object-Oriented Programming)
RDF — 资源描述框架(Resource Description Framework)
SPARQL — 简单协议和 RDF 查询语言(Simple Protocol and RDF Query Language)
SQL — 结构化查询语言(Structured Query Language)
UI — 用户界面(User interface)
W3C — 万维网联盟(World Wide Web Consortium)
在开发 Web 应用程序时,为逻辑层和 UI 层创建放置服务器端代码的数据库结构是一种标准实践。要连接到数据库,服务器端代码需要执行一些基本的创建、更新、删除和 — 最重要的 — 读取记录等操作。由于 Web 应用程序的后台数据库通常都是关系数据库,因此这些 CRUD 操作都是使用众所周知的 SQL 语言执行的。但是,随着 Web 开发越来越多地采用面向对象的编程(OOP),模型也随之发生改变。
资源描述框架(Resource Description Framework,RDF)是描述对象同时保留数据含义的理想方法。简单协议和 RDF 查询语言(Simple Protocol and RDF Query Language,SPARQL — 发音为 “sparkle”)是通常用于针对该数据进行查询的语言,因为它在语句构成上匹配 RDF 本身的结构。RDF 和 SPARQL 都是所谓 语义 Web 栈(semantic Web stack)中的技术。
要彻底地应用语义 Web 理念,您可以使用 SPARQL 将传统的 Web 开发技术应用到 RDF 数据中。本文将展示如何使用简化的模式—视图—控制器(Model-View-Controller,MVC)设计模型、PHP 服务器端脚本语言和 SPARQL 连接到 RDF — 与使用关系数据库系统中的 SQL 相反。
SQL 和 SPARQL CRUD 操作
先决条件 本文假定您基本了解 SQL、PHP 和 Web 应用程序开发。了解语义 Web 也十分有利。要对基于语义 Web 的数据运行 create、update 和 delete 命令,需要具有支持 SPARQL/Update 规范的语义 Web 数据库。
在使用 SQL 和 SPARQL 进行开发时,需要查看一下 CRUD 操作之间的异同。清单 1 显示了 read 操作的 SQL 代码。
SELECT realname, dob, locationFROM UserTable WHERE realname = "John Smith";
将这段基于 SQL 的代码与清单 2 中所示的基于 SPARQL 的代码相比较。采用这两个 read 操作的原因在于它们最易于理解、实现和说明。这对于 SQL 和 SPARQL 来说都是一样的。
PREFIX foaf: PREFIX rdf: SELECT ?uri ?name ?dob ?locationFROMWHERE{ ?urirdf:type foaf:Person ;foaf:name "John Smith" ;foaf:birthday?dob ;foaf:location ?location .} ;
在比较两张清单时,您的第一个想法很可能是 SPARQL 版本明显比 SQL 版本长很多。这是事实,但是请不要误以为 SQL 必然更简单而且更干净。根据所运行引擎的不同,SPARQL 可以全部通过称为链接数据结果(linked data effect)的内容进行分发。此外,它允许拥有动态模式,因为它拥有互相链接的面向对象的透视图,与严格的 SQL 关系透视图形成对照。如果您想要把关系数据库表分隔为许多数据孤岛,则实际上使用的 SQL 代码行将比 SPARQL 多很多 — 更不必说 SQL 中会出现大量令人讨厌的 JOIN 描述符。
SPARQL 的前两行是 PREFIX 声明。根据语义 Web 理论,一切内容 — 无论是对象还是数据图来源(也是一个对象)— 都有统一资源标识符(Uniform Resource Identifier,URI)。PREFIX 行只是将临时标签应用到一些 URI 中 — 在本例中为 Friend of a Friend 和 RDF 模式。其中的好处是您以后可以在查询中使用 PREFIX 声明而不必使用完整的 URI。
SPARQL 代码的下一行描述了查询请求。这条语句在本质上与 SQL 语句相同,不同之处是对 URI 的附加请求。注意问号的使用(?)是为了表示术语是变量。
FROM 语句描述了获取数据的位置。这在 SQL 和 SPARQL 中是相同的,只是在 SPARQL 中,数据源名称是 URI,而非表示计算机或网络中某个物理位置的字符串。
两者的 WHERE 语句完全不同,因为使用 SPARQL,必须指定用于获取数据的模式。同样,如果尝试过使用关系方法执行此操作,则需要花费的代价比普通 SQL 多得多:需要使用 PHP、Java? 编程语言或者一些其他服务器端语言才能执行数据源之间的检查。SPARQL 代码行完成的操作比较明了,这包括确保正在检索的数据只属于 Person 类型。SPARQL 将获取名称和位置,同时执行一些模式匹配以查找正确的 John Smith。
创建
SPARQL 中的 CRUD 操作通常比 read 操作更神秘。但是,可以完成这些操作。首先,create 操作将把新记录或对象插入到表或图表中。
INSERT INTO UserTable (realname, dob, location) VALUES ("John Smith", "1985-01-01", "Bristol, UK");
现在,比较清单 3 中基于 SQL 的代码与清单 4 中基于 SPARQL 的代码中的 create 操作。
PREFIX foaf: PREFIX rdf: INSERT INTO GRAPH (?realname, ?dob, ?location) { rdf:Type foaf:Person ; foaf:name "John Smith" ; foaf:birthday <1985-01-01t00:00:00> ; foaf:location "Bristol, UK" }
API — 应用程序编程接口(Application Programming Interface)
CRUD — 创建/读/更新/删除(Create/Read/Update/Delete)
HTTP — 超文本传输协议(Hypertext Transfer Protocol)
MVC — 模式—视图—控制器(Model-View-Controller)
OOP — 面向对象的编程(Object-Oriented Programming)
RDF — 资源描述框架(Resource Description Framework)
SPARQL — 简单协议和 RDF 查询语言(Simple Protocol and RDF Query Language)
SQL — 结构化查询语言(Structured Query Language)
UI — 用户界面(User interface)
W3C — 万维网联盟(World Wide Web Consortium)
在开发 Web 应用程序时,为逻辑层和 UI 层创建放置服务器端代码的数据库结构是一种标准实践。要连接到数据库,服务器端代码需要执行一些基本的创建、更新、删除和 — 最重要的 — 读取记录等操作。由于 Web 应用程序的后台数据库通常都是关系数据库,因此这些 CRUD 操作都是使用众所周知的 SQL 语言执行的。但是,随着 Web 开发越来越多地采用面向对象的编程(OOP),模型也随之发生改变。
资源描述框架(Resource Description Framework,RDF)是描述对象同时保留数据含义的理想方法。简单协议和 RDF 查询语言(Simple Protocol and RDF Query Language,SPARQL — 发音为 “sparkle”)是通常用于针对该数据进行查询的语言,因为它在语句构成上匹配 RDF 本身的结构。RDF 和 SPARQL 都是所谓 语义 Web 栈(semantic Web stack)中的技术。
要彻底地应用语义 Web 理念,您可以使用 SPARQL 将传统的 Web 开发技术应用到 RDF 数据中。本文将展示如何使用简化的模式—视图—控制器(Model-View-Controller,MVC)设计模型、PHP 服务器端脚本语言和 SPARQL 连接到 RDF — 与使用关系数据库系统中的 SQL 相反。
SQL 和 SPARQL CRUD 操作
先决条件 本文假定您基本了解 SQL、PHP 和 Web 应用程序开发。了解语义 Web 也十分有利。要对基于语义 Web 的数据运行 create、update 和 delete 命令,需要具有支持 SPARQL/Update 规范的语义 Web 数据库。
在使用 SQL 和 SPARQL 进行开发时,需要查看一下 CRUD 操作之间的异同。清单 1 显示了 read 操作的 SQL 代码。
SELECT realname, dob, locationFROM UserTable WHERE realname = "John Smith";
将这段基于 SQL 的代码与清单 2 中所示的基于 SPARQL 的代码相比较。采用这两个 read 操作的原因在于它们最易于理解、实现和说明。这对于 SQL 和 SPARQL 来说都是一样的。
PREFIX foaf:
在比较两张清单时,您的第一个想法很可能是 SPARQL 版本明显比 SQL 版本长很多。这是事实,但是请不要误以为 SQL 必然更简单而且更干净。根据所运行引擎的不同,SPARQL 可以全部通过称为链接数据结果(linked data effect)的内容进行分发。此外,它允许拥有动态模式,因为它拥有互相链接的面向对象的透视图,与严格的 SQL 关系透视图形成对照。如果您想要把关系数据库表分隔为许多数据孤岛,则实际上使用的 SQL 代码行将比 SPARQL 多很多 — 更不必说 SQL 中会出现大量令人讨厌的 JOIN 描述符。
SPARQL 的前两行是 PREFIX 声明。根据语义 Web 理论,一切内容 — 无论是对象还是数据图来源(也是一个对象)— 都有统一资源标识符(Uniform Resource Identifier,URI)。PREFIX 行只是将临时标签应用到一些 URI 中 — 在本例中为 Friend of a Friend 和 RDF 模式。其中的好处是您以后可以在查询中使用 PREFIX 声明而不必使用完整的 URI。
SPARQL 代码的下一行描述了查询请求。这条语句在本质上与 SQL 语句相同,不同之处是对 URI 的附加请求。注意问号的使用(?)是为了表示术语是变量。
FROM 语句描述了获取数据的位置。这在 SQL 和 SPARQL 中是相同的,只是在 SPARQL 中,数据源名称是 URI,而非表示计算机或网络中某个物理位置的字符串。
两者的 WHERE 语句完全不同,因为使用 SPARQL,必须指定用于获取数据的模式。同样,如果尝试过使用关系方法执行此操作,则需要花费的代价比普通 SQL 多得多:需要使用 PHP、Java? 编程语言或者一些其他服务器端语言才能执行数据源之间的检查。SPARQL 代码行完成的操作比较明了,这包括确保正在检索的数据只属于 Person 类型。SPARQL 将获取名称和位置,同时执行一些模式匹配以查找正确的 John Smith。
创建
SPARQL 中的 CRUD 操作通常比 read 操作更神秘。但是,可以完成这些操作。首先,create 操作将把新记录或对象插入到表或图表中。
INSERT INTO UserTable (realname, dob, location) VALUES ("John Smith", "1985-01-01", "Bristol, UK");
现在,比较清单 3 中基于 SQL 的代码与清单 4 中基于 SPARQL 的代码中的 create 操作。
PREFIX foaf:
2008年12月13日星期六
中英详解Windows从源代码编译PHP方法


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 程序.
订阅:
博文 (Atom)

