centos 64位 + apache + php + gd 库安装
centos 64位 和32位安装有一些不同
安装apache
安装mysql
需要用到的包
zlib-1.2.3.tar.gz
libiconv-1.11.tar.gz
freetype-2.3.5.tar.gz
libpng-1.2.20.tar.gz
jpegsrc.v6b.tar.gz
gd-2.0.35.tar.gz
ibxml2-sources-2.6.30.tar.gz
gettext
1. zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
CFLAGS="-O3 -fPIC" ./configure
2. libiconv
2.libiconv
tar zxvf libiconv-1.11.tar.gz
cd libiconv-1.11/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/libiconv
make && make install
3. freetype
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/freetype
make && make install
4. tar zxvf libpng-1.2.20.tar.gz
cd libpng-1.2.20/
CFLAGS="-O3 -fPIC" ./configure
make && make install
cd ../
5 jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
CFLAGS="-O3 -fPIC" ./configure --enable-static --enable-shared
make && make install
cd ../
6 gettext
tar
cd
CFLAGS="-O3 -fPIC" ./configure
7
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/gd --with-freetype=/usr/local/webserver/lib/freetype --with-jpeg --with-png
make
make install
cd ../
8. libxml2
tar zxvf libxml2-sources-2.6.30.tar.gz
cd libxml2-2.6.30/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/libxml
make && make install
cd ../
安装php
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache/bin/apxs --with-gd=/usr/local/webserver/lib/gd --enable-gd-native-ttf --enable-gd-jis-conv --with-iconv-dir=/usr/local/webserver/lib/libiconv --with-freetype-dir=/usr/local/webserver/lib/freetype --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib --with-libxml-dir=/usr/local/webserver/lib/libxml --enable-xml
添加php到apache
相关文档:
这篇文章的出发点是我对插件机制的理解,及其在PHP中的实现。此方案仅是插件机制在PHP中的实现方案之一,写下来和大家分享,欢迎大家一起讨论。
插件,亦即Plug-in,是指一类特定的功能模块(通常由第三方开发者实现),它的特点是:当你需要它的时候激活它,不需要它的时候禁用/删除它;且无论是激活还是禁用都不影 ......
//
dirname()
// Returns directory name component of path
basename()
// Returns filename component of path
pathinfo()
// Returns information about a file path;
// pathinfo() returns an associative array containing information about path .
parse_url()
// Parse a URL and return its comp ......
index.php(实现输入验证码页面)代码如下: Code代码如下: <html>
<head>
<title>check code</title>
</head>
<body>
<form name=check method=post action=check.php>
<input type=hidden name=init value=1>
验证 ......
JavaScript ==> PHP:
方法一: 先用PHP生成js代码,然后通过浏览器的自动刷新,将javascript变量传递到PHP脚本中。
注意:在实际应用中要防止用户在地址栏内更改传递的变量值。
<?php
if($qq) echo $qq.'<br>';
else echo "<scrip ......