PhpÅжÏÓû§Í¨¹ýÊÖ»ú·ÃÎÊwap»¹ÊǵçÄÔÖ±½Ó·ÃÎÊ
Ê×ÏÈ˵×î¸ù±¾µÄ½â¾ö·½·¨£º
ÊÖ »ú·ÃÎÊʱ£¬»á¸½´ø·¢ËÍuser-agentÐÅÏ¢£¬Õâ¸öÐÅÏ¢ÀïÃæ»áÓÐÊÖ»úºÅÂëÐÅÏ¢£¬ÄÇôÈç¹ûÄÜÈ¡µÃÊÖ»úºÅÂ룬Ôò¿ÉÒԿ϶¨ÊÇͨ¹ýÊÖ»úwap·ÃÎʵġ£µ«ÊÇÄ¿Ç°ÖÐ ¹úÒƶ¯ÒѾÆÁ±ÎÁËuser-agentÐÅÏ¢£¬ËùÒÔ»ñÈ¡²»µ½ÊÖ»úºÅÂë¡£ÓйØϵµÄÅóÓÑ¿ÉÒÔÁªÏµÒƶ¯¹«Ë¾£¬°ÑwapÍøÕ¾·þÎñÆ÷µÄipÌá½»¸øÖйúÒƶ¯£¬¼ÓÈë°×Ãûµ¥ ºó¼´¿ÉÈ¡µÃuaÐÅÏ¢¡£Ä¿Ç°ÖйúÁªÍ¨¿ÉÒÔÖ±½ÓÈ¡µ½ÊÖ»úºÅ£¬¶ÔÁªÍ¨Óû§´Ë·½°¸¿ÉÍêÃÀʵʩ¡£
½ÓÏÂÀ´ËµÎҵĽâ¾ö·½°¸£º
ÊÖ»ú·ÃÎÊ£¬ÔÀíÊÇÊÖ»úͨ¹ýÒƶ¯¹«Ë¾µÄ´úÀí·þÎñÆ÷½øÐеķÃÎÊ¡£ÄÇôÎÒÃǾͿÉÒÔÀí½âÊÇһ̨ÆÕͨµçÄÔʹÓÃÁË´úÀí·þÎñÆ÷¡£µ±ÊÖ»úͨ¹ý´úÀí·þÎñÆ÷·ÃÎʵÄʱºò£¬httpÍ·ÐÅÏ¢»áºÁÎÞÒÉÎʵİüº¬Ò»¸öÐÅÏ¢£ºvia¡£Õâ¸öÐÅÏ¢ÌṩÁËÓмÛÖµµÄÅжÏÐÅÏ¢¡£
ÀýÈçºÓÄÏÒƶ¯È¡µÃµÄviaÐÅÏ¢ÊÇ£º
http/1.1 hazz-b-gw001-wap(infox-wisg, huawei technologies)
ºÓÄÏÁªÍ¨µÄviaÐÅÏ¢ÊÇ£º
zxwap gateway,zte technologies
ÆäËû¸÷Ê¡µÄhttpÍ·ÐÅÏ¢ºÍÕâ¸ö´óͬСÒ죬ÅжÏÊÇ·ñÊÖ»ú·ÃÎʵķ½°¸¾Í³öÀ´ ÁË£º»ñÈ¡httpµÄviaÐÅÏ¢×Ö·û´®¿´ÊÇ·ñ°üº¬wap×Ö·û£¬Èç¹ûÓÐÔòÊÇͨ¹ýÊÖ»ú·ÃÎÊ¡£ÕâÑù×öµÄ½á¹ûÊÇûÓÐÈËÄÜαÔìÊÖ»ú·ÃÎÊ£¬ÅжϾø¶Ô׼ȷ¡£×ÔÈ»£¬ÕâÑù¶ÔÓÚ ÍøÉÏÁ÷ÐеÄÊÖ»úwapÄ£ÄâÆ÷Ò²×öÁËÆÁ±Î—-´Ó¸ù±¾ÉÏÆÁ±Î¡£
²Ù×÷´úÂëÒ²ºÜ¼òµ¥£º
// check if wap by xhat
function check_wap() {
return stristr($_SERVER['HTTP_VIA'],”wap”) ? true : false;
}
// check over
´ÓÎÒ²éÔĵÄ×ÊÁÏÀ´¿´£¬Ä¿Ç°´Ë·½·¨Ó¦¸ÃÊÇÆù½ñ»¥ÁªÍøÉÏ׼ȷÂÊ×î¸ß¡¢×î¼òµ¥µÄÅжÏÊÖ»ú·ÃÎÊ·½·¨¡£
ÒÔÉϵķ½·¨¿ÉÒÔʵÏÖÅжϷÃÎÊÀ´Ô´ÊÇÊÖ»ú»¹ÊǵçÄÔ£¬µ«ÓÐÒ»¸öÎÊÌâ¾ÍÊÇ£¬Ö»ÄÜͨ¹ýÊÖ»ú²ÅÄÜ·ÃÎÊ£¬Ö§³ÖWAPµÄä¯ÀÀÆ÷ºÍÊÖ»úÄ£ÄâÆ÷Ò²²»ÄÜ·ÃÎÊ£¬Õâ¸ø²âÊÔ´øÀ´ÁËÂé·³£¬Ò²ÓеãÏÞÖÆËÀÁË¡£
ÏÂÃæµÄ·½°¸ÊÇ£º
ͨ¹ýÅжÏä¯ÀÀÆ÷´úÀí±êʶ·û£¬ÅжÏÊÇ·ñÊÇÖ§³ÖWAPµÄä¯ÀÀÆ÷À´¾ö¶¨·ÃÎÊÒ³Ãæ¡£ÕâÓÐÒ»¸öȱµã¾ÍÊDz»¿ÉÄÜÈ«²¿µÄÁгöËùÓÐÊÖ»úµÄä¯ÀÀÆ÷±êʶ·ûÓëËùÖ§³ÖµÄä¯ÀÀÆ÷±êʶ·û¡£
ÏÂÃæ¿´¿´ÊµÏֵĴúÂ룺
function check_wap()
{
if (strpos(strtoupper($_SERVER['HTTP_ACCEPT']),”VND.WAP.WML”) > 0)
{
// Check whether the browser/gateway says it accepts WML.
$br = “WML”;
}
else
{
$browser=substr(trim($_SERVER['HTTP_USER_AGENT']),0,4);
if ($browser==”Noki” || // Nokia phones and emulators
$browser==”Eric” || // Er
Ïà¹ØÎĵµ£º
×î½üÏëд¸öÈí¼þÍæÍ棬ץȡÍøÒ³ÉϵÄÄÚÈÝ
ץȡÍøÒ³ÄÚÈݵÄÎÒ·ÅÔÚÒ»¸öÎļþÖÐд³ÉÀàÁË
ÒÔÏÂÊÇ´úÂë
<?php
class myhttp
{
var $_host;
var $_url;
var $_port;
var $_errno;
var $_errstr;
va ......
VisualSVNÔö¼ÓÃÜÂëphpÐÞ¸ÄÒ³Ãæ
1.¼ÙÉèVisualSVN°²×°ÔÚ C:\Program Files\VisualSVN Server
2.ÏÂÔز¢°²×°php windows°æ±¾£¬¼ÙÉè°²×°ÔÚc:\php
¿ÉÒÔµ½php¹Ù·½ÍøÕ¾ÏÂÔØ www.php.net
¸½¼þÖдøµÄÊÇ php-5.3.2-Win32-VC6-x86.zip
3.VisualSVNÔö¼ÓphpÖ§³Ö
×¢ÒâÐÞ¸Ä "c:/php/php5apache2_2.dll" ΪÕýȷ·¾¶
C:\ ......
ÔÚlinuxÏÂͨ¹ýsvn¸üÐÂÁËÒ»¸öphpÎļþ£¬Ä¿µÄÊÇÏëͨ¹ýÖ´ÐÐÕâ¸öÎļþÀ´¶ÁÊý¾Ý²åÈëµ½Êý¾Ý¿â¡£ÔÚÆäÖеļ¸Ì¨Ö´ÐÐûÓÐÎÊÌ⣬ÆäÖÐһ̨¾Í·¢ÏÖÁËCould not open input fileÕâ¸ö´íÎ󣬺óÀ´²éÕÒ×ÊÁϲŷ¢ÏÖÔÀ´ÊÇÎļþ¸ñʽµÄÎÊÌ⣬³ö´íʱÎļþ¸ñʽÊÇdos£¬¿ÉÒÔÔÚviÖÐÓÃ:set ffÀ´²é¿´£¬Èç¹ûÊÇdos¸ñʽ£¬ÄÇôÔòÓÃ:set ff=unixÀ´ÉèÖÃеĸñʽ£¬ÕâÑ ......
//×îºÃÏȽ¨Á¢Ò»¸ö upload/publicÕâ¸öÎļþ¼Ð£¬ÒÔÏÂÊÇupload.php
<?php
/**
*********************************************
²ÎÊýÉ趨
*********************************************
**/
//×î´óÉÏ´«Îļþ´óС
$MAX_SIZE = 20000000;
//ÉèÖÃMineÀàÐÍ
$FILE_MIMES = array
('image/jpeg','image/jpg','image/gif ......