Recently in php Category

I install php5.2.6 with apache2.x, I meet this error!

Installing PHP SAPI module:       apache2handler
/home/apache2/build/instdso.sh SH_LIBTOOL='/home/apache2/build/libtool' libphp5.la /home/apache2/modules
/home/apache2/build/libtool --mode=install cp libphp5.la /home/apache2/modules/
cp .libs/libphp5.lai /home/apache2/modules/libphp5.la
cp .libs/libphp5.a /home/apache2/modules/libphp5.a
chmod 644 /home/apache2/modules/libphp5.a
ranlib /home/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /home/yujingtao/soft/php-5.2.6/libs'
Warning!  dlname not found in /home/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /home/apache2/modules/libphp5.so
chmod: cannot access `/home/apache2/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1

my configure script is below:
./configure --with-apxs2=/home/apache2/bin/apxs --with-mysql-sock=/tmp/mysql.sock LDFLAGS='-L/usr/lib64'

google for a along time , still have this error, Can anybody help me??
| | Comments (0) | TrackBacks (0)

使用php判断用户访问的浏览器类别
判断如果得不到浏览器类型或者得到的浏览器类型为手机类型的话,页面跳转到手机可以访问的wap站点。


//add redirect to wap
$browser = $_SERVER['HTTP_USER_AGENT'];

if(empty($browser)||$browser==""||strpos(strtolower($browser),"mot")||strpos(strtolower($browser),"norkia")||strpos(strtolower($browser),"sonyericsson")){
header("location:http://2hei.net");
}


if(strpos(strtolower($browser),"msie")||strpos(strtolower($browser),"opera")||strpos(strtolower($browser),"firefox")){
  echo "www-access";
  echo strlen($browser);
}

注意:使用header进行页面跳转时,前面不要有任何输出。


获得其他访问用户信息。

“HTTP_USER_AGENT”
“REMOTE_ADDR”
“REMOTE_PORT”

| | Comments (0) | TrackBacks (0)

关于本篇存档

本页是归档于分类php

上一分类:other

下一分类:python

回到首页 或者查看归档文章

php: 按月归档

  • Powered by FeedBurner
  • Add to Google Reader or Homepage
  • Add to My AOL
  • Subscribe in NewsGator Online
  • del.icio.us/2heidel.icio.us/2hei
  • Subscribe to feed feeds