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 发送邮件
作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 修改:2007-06-17 浏览:14208 :: ::
PHP Sessions
PHP allows you to send e-mails directly from a script.
PHP允许你通过脚本直接发送e-mail。
The PHP mail() Function
PHP mail()函数
The PHP m ......
//
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 ......
不是很赞同使用session 每一个php的页面在调用session的时候都必须先声明session。
例如:在php文件的最前面声明session;
<?php
session_start();//声明session
$_SESSION['id']=$_POST['id'];//赋值
?>
如果不这样声明的话,也免就无法获得已经定义好的sessio ......
JavaScript ==> PHP:
方法一: 先用PHP生成js代码,然后通过浏览器的自动刷新,将javascript变量传递到PHP脚本中。
注意:在实际应用中要防止用户在地址栏内更改传递的变量值。
<?php
if($qq) echo $qq.'<br>';
else echo "<scrip ......
找到一个能用的 分享给你吧
刚已经在本机做过认真测试,绝对无问题
(表结构:
id 表ID(唯一)
title 各类标题
flid 类别的ID (大类为1 中类为2 小类为3)
pid 上类的ID(大类就跟大类,提交中类的时候这地方写大类的ID,提交小类的时候写中类的ID) )
<?php
$link=mysql_connect("l ......