易截截图软件、单文件、免安装、纯绿色、仅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不变的一些经典类

 MYSQL,分页类是写PHP代码最常用的几个类。
今天看PHP100的视频,越用越发现里面两个类好强大,虽然感觉还是有局限性,但是它的写法已经很成熟了。
一个是MYSQL,一个是分页类。
MYSQL:
<?php
class mysql {
private $db_host; //数据库主机
private $db_user; //数据库用户名
private $db_pwd; //数据 ......

PHP自动转换转义字符

在php.ini文件中magic_quotes_gpc = on   ---- 一般情况下是on,怕用户忘记转义某些特殊字符。
因此,要判断当前php的配置要取得我们想要的内容。
$gpc=get_magic_quotes_gpc();     ----返回1,magic_quotes_gpc = on,0为off
if ($gpc==1){
     $json=s ......

PHPnow = Apache + PHP + MySQL + phpMyAdmin

 
PHPnow 是什么?
Win32 下绿色免费的 Apache + PHP + MySQL 环境套件包。
简易安装、快速搭建支持虚拟主机的 PHP 环境。附带 PnCp.cmd 控制面板,帮助你快速配置你的套件,使用非常方便。
PHPnow 是绿色的,解压后执行 Init.cmd 初始化,即可得到一个 PHP + MySQL 环境。
然后就可以直接安装 Discuz!, PHPWind, ......

java和php数字处理上

java使用Math类,php使用系统函数
ceil功能 大于等于某数(常用于分页页数计算)
php中:ceil(a/b)
java中:(int)Math.ceil((double)a/b))    Math.ceil在java中需要传入double型,而返回也是double型。注意这里用(double)a/b才可以。
a/b,(dobule)(a/b)都不行。因为他们会先自动舍弃小数取得整数
flooe ......

提供一个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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号