易截截图软件、单文件、免安装、纯绿色、仅160KB

apache php 常见问题

 linux下apache+php安装常见问题 configure: error: Unable to find libgd.(a|so)
如果使用的是ubuntu或debian就很简单了,直接sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd 就基本上搞定,但是用源代码安装还是很麻烦~
wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0.11.tar.gz
cd gd-2.0.11
sudo ./configure --prefix=/usr/local/gd2
sudo make
sudo make install再php:~/:./configure  …… --with-gd=/usr/local/gd2  ……
以下是转载的,而且都是基于yum install或者apt-get的。
1) Configure: error: xml2-config not found. Please check your libxml2 installation.
Solutions :
Quote:
#yum install libxml2 libxml2-devel (For Redhat & Fedora)
# aptitude install libxml2-dev      (For ubuntu)
 
2) Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s <evp.h>
Solutions :
Quote:
#yum install openssl openssl-devel
3) Configure: error: Please reinstall the BZip2 distribution
Solutions :
Quote:
# yum install bzip2 bzip2-devel
4) Configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
Solutions :
Quote:
# yum install curl curl-devel   (For Redhat & Fedora)
# install libcurl4-gnutls-dev    (For Ubuntu)
5) Configure: error: libjpeg.(also) not found.
Solutions :
Quote:
# yum install libjpeg libjpeg-devel
6) Configure: error: libpng.(also) not found.
Solutions :
Quote:
# yum install libpng libpng-devel
7) Configure: error: freetype.h not found.
Solutions :
Quote:
#yum install freetype-devel
8) Configure: error: Unable to locate gmp.h
Solutions :
Quote:
# yum install gmp-devel
9) Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
Solutions :
Quote:
# yum install mysql-devel            (For Re


相关文档:

初学PHP的18个基础例程

 
如何创建我们的第一个PHP页面呢?非常简单的!选择我们使用的一个最好的设计工具,当然你也可以 只使用记事本。创建之后记得要保存为扩展名为PHP的文件,然后传到我们的服务器
上。
  在编写PHP程序之前通常我们需要配置我们的环境,也就是说服务器
要支持PHP才能行啊
  一、PHP的基本结构:
  使用Incl ......

PHP exif 介绍

 // PHP exif
// --
// wikipedia 介绍:
// EXIF(Exchangeable image file format)是可交换图像文件的缩写,是专门为数码相机的照片设定的,可以记录数码照片的属性信息和拍摄数据。
// EXIF可以附加于JPEG、TIFF、RIFF等文件之中,为其增加有关数码相机拍摄信息的内容和索引图或图像处理软件的版本信息。
......

php中的文件锁

文件锁有两种:共享锁和排他锁,也就是读锁(LOCK_SH)和写锁(LOCK_EX)
文件的锁一般这么使用:
$fp = fopen("filename", "a");   
flock($fp, LOCK_SH) or die("lock error")   
$str = fread($fp, 1024);   
flock($fp, LOCK ......

提供一个PHP通用分页Function给大家

function mysql_conn(){
$conn=mysql_pconnect('localhost','root','root');
mysql_select_db('liuyan');
mysql_query('set names utf8');
return $conn;
}
//$sql为SQL语句;$page为第几页,$pagesize为一页显示多少条
//最后将返回一个array的数据类型,里面包含$arr['result'],$arr['fypage']
function page ......

php获取网站的内容(SSL,GET,POST形式都能获取到)!

封装一个function,以便复用。
支持https,或者http的get或者post。
function httpURLfeedback($url,$request_type,$time_out = "60") {
$arr = parse_url($url);
$transports = "";
$port = 0;
$host = $arr['host'];
$query = $arr['query'];
$path = $arr['path'];
if($urlarr["scheme"] ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号