目前网络编程界主要分为四大家族,主要是:
一)html家族:
就是纯html+js,当然此家族早已在进化的过程中被淘汰出局。但它正是敢于直立起来走出大森林的哪一支
二)php家族:
此家族凭借开源的力量以压倒性优势抢占了互联网界的大半壁江山,常以阿帕奇作服务器,以PHP作引擎
以ZendOptimizer作优化,以MySQL作仓库,以PHPMyAdmin仓库管理员(有钱人以Sun Monitor取代之)
还有一部分人以ECMS或DedeCMS或SupeSite等等作模板。
1)Apache:
1.1)
解压Apache(NoSSL),Runing-->cmd:或者像我这样写个脚本:
d:
cd D:\Apache\bin
httpd -k install -n "Apache2.2" -f "D:\Apache\conf\httpd.conf"
sc config Apache2.2 start=DEMAND
rem net start Apache2.2
start D:\Apache\conf\httpd.conf
到此如果conf已关联Notepad的话已成功打开httpd.conf。下面开始配置:
ServerRoot "D:/Apache/"
Listen 80
LoadModule php5_module "D:/PHP/Forapacheisapi/php5apache2_2.dll"
LoadFile D:/PHP/Forapacheisapi/php5ts.dll
#LoadFile D:/PHP/Forapacheisapi/libmysql.dll
AddType application/x-httpd-php .php
PHPIniDir "D:/PHP/Forapacheisapi"
ServerAdmin gysh800@qq.com
#ServerName www.hzhghg.com:80
DocumentRoot "F:/Hzhghg/PHP"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all #注意这里Deny已改为Allow
</Directory>
<Directory "F:/Hzhghg/PHP">
</Directory>
<IfModule dir_module>
DirectoryIndex index.shtml index.html index.htm index.php default.shtml default.html default.php
</IfModule>
ScriptAlias /cgi-bin/ "D:/Apache/cgi-bin/"
# "D:/Apache/Main/cgi-bin" should be changed to whatever your ScriptAliased
#Options Indexes FollowSymLinks Includes
1.2)
PHP目前有两个版本,分别是:VC9ForIIS和VC6ForApache,这里我们选择后者。
PHP目前有两种执行方式,分别是:For Apache的Moudle方式即 ISAPI=For IIS ISAPI选Thread Safe版.
For Apache的Fast CGI方式即CGI=For IIS FastCGI选No Thread Safe版
这里我们选择前者。
好了,环境变量PHPRC根目录并加入path.解压PHP。到根目录下写一类似我这样的脚本并执行:
if exist php.ini-development ren php.ini-development php.ini
regedit /s pws-php5isapi.reg
start php.ini
如果一切百顺利,此时应该打开了php.ini这个文本文件。好了,开始配置:
short_open_tag
short_open_tag = on
asp_tags = Off
precision = 14
y2k_compliance = On
output_buffering = 4096
;output_handler =
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100
allow_call_time_pass_reference = Off
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 360
max_input_time = 60
memory_limit = 32M
error_reporting = E_ALL | E_STRICT
display_errors = On ;;;;;;;注意
display_startup_errors = On ;;;;;注意
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = On ;;;;注意
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_globals = Off ;;;;;注意
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
magic_quotes_gpc = On ;;;;;;;;;;;注意!!!
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
include_path = ".;D:\PHP\Forapacheisapi\Hzhinclude"
doc_root =
user_dir =
extension_dir = "D:\PHP\Forapacheisapi\ext"
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
extension=php_gd2.dll
extension=php_imap.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_soap.dll
extension=php_sockets.dll
date.timezone = "Asia/Shanghai"
pdo_mysql.default_socket=
define_syslog_variables = Off
SMTP = localhost
smtp_port = 25
;sendmail_path =
mail.add_x_header = On
sql.safe_mode = Off
odbc.allow_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
session.save_handler = files
session.save_path = "D:\PHP\Forapacheisapi\Session"
session.use_cookies = 1
[Zend]
zend_extension_manager.optimizer_ts="D:\SysDIY\Programer\PHP\ZendOptimizer\Main\lib\Optimizer-3.3.0"
zend_extension_ts="D:\SysDIY\Programer\PHP\ZendOptimizer\Main\lib\ZendExtensionManager.dll"
1.3)
ZendOptimizer根据提示一路Next即可,完成后会在PHP.ini添加上面的最后两行。
MySQL同样根据提示一路Next即可完成安装。对于PHPMyAdmin直接解压到你的网站根目录,然后
到PHPMyAdmin根目录下写一脚本:
@echo off
copy .\libraries\config.default.php .\config.inc.php
start .\config.inc.php
net start Apache2.2
net start MySQL
如果一切顺利的话,已经成功地打开了config.inc.php这个文本文件。好了,开始配置:
$cfg['PmaAbsoluteUri'] = 'http://localhost/PHPMyAdmin
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['blowfish_secret'] = 'www.hzhghg.com';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
1.4)
对于使用模板建站的朋友,如像ECMS则直接Del install.off http://localhost/e/install/index.php一路Next即可。
三)JSP家族:
四)ASP家族:
吃完饭再写吧......
By 红色指令 2009