uchome¶þ´Î¿ª·¢ php³ÌÐò½²½â£¨common.phpÎļþ½âÎö£©
index.phpÎļþµÚÒ»ÐоÍÊÇ°üº¬ÁË
include_once('./common.php');
ÎļþËùÒÔÏȶÔcommon.phpÎļþ½âÎö
<?php
/*
[UCenter Home] (C) 2007-2008 Comsenz Inc.
$Id: common.php 10981 2009-01-14 03:05:20Z liguode $
*/
//¶¨ÒåÒ»¸ö³£Á¿£¬ÓÃÀ´ÔÚÆäËûÒ³ÃæÖУ¬·ÀÖ¹±»¶ñÒâÓû§Ö±½Óµ÷ÓÃÆäËûPHPÎļþ¡£
@define('IN_UCHOME', TRUE);
//¶¨ÒåÒ»¸ö³£Á¿£¬Õâ¸ö³£Á¿±íʾ°æ±¾ºÅ
define('X_VER', '1.5');
//Õâ¸öÒ²ÊÇÒ»¸ö³£Á¿£¬´Î°æ±¾ºÅ
define('X_RELEASE', '20090114');
/*¶¨Òå³ÌÐòµÄµ÷ÊÔģʽ£¬ÔÚÎÒÃǵ÷ÊÔ³ÌÐòµÄʱºò½«³£Á¿ÖµÉèΪ1£¬ÕâÑù³ÌÐò³ö´íµÄʱºò»áÔÚÒ³ÃæÏÔʾ´íÎóÐÅÏ¢¡£
ÔÚµ÷ÊÔÍê±ÏÕý³£Í¶ÈëʹÓúóÉèΪ0£¬ÕâÑù³ÌÐò³ö´í²»»áÏÔʾ¸øÓû§¡£
*/
define('D_BUG', '0');
//ͨ¹ýD_BUG³£Á¿ÖµÖ¸¶¨´íÎ󱨸æÀàÐÍ¡£ÆäÖÐerror_reporting()µÄ²ÎÊýÊÇ´íÎ󱨸æÀàÐÍ£¬Ïà¹Ø²ÎÊý¿É²éѯPHPÊÖ²á
D_BUG?error_reporting(7):error_reporting(0);
//ÕâÏÂÃ涼ÊǶ¨ÒåµÄÈ«¾Ö±äÁ¿¡£¾ßÌåµÄ»áÔÚºóÃæʹÓõÄʱºòÒ»Ò»½éÉÜ
$_SGLOBAL = $_SCONFIG = $_SBLOCK = $_TPL = $_SCOOKIE = $_SN = $space = array();
/*
$_SGLOBAL = ³¬È«¾Ö¹«¹²ÐÅÏ¢
$_SCONFIG = ³ÌÐòÅäÖÃÐÅÏ¢
$_SBLOCK = Ó¦ÓÿéÐÅÏ¢
$_TPL = Ä£°åÐÅÏ¢
$_SCOOKIE = cookieÐÅÏ¢
$_SN = UCenter¹ØÁ¬ÐÅÏ¢
$space = Óû§ÐÅÏ¢
$_SGLOBAL['msglang'] = ÌáʾÐÅÏ¢µÄÓïÑÔÐÅÏ¢,ÆäËüÒ³µÄÓïÑÔ»ù±¾ÉÏÈ«²¿Ð´ÔÚÄ£°åÉÏ;
*/
//¶¨Òå³ÌÐòĿ¼³£Á¿¡£ÆäÖÐDIRECTORY_SEPARATORÊÇ·¾¶·Ö¸ô·û£¬linuxÉϾÍÊÇ’/’ windowsÉÏÊÇ’\’
define('S_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
//¼ÓÔØ»ù±¾µÄÅäÖÃÎļþ£¬ÓÃÁË@·ûºÅ£¬´ïµ½ÕÒ²»µ½¸ÃÎļþʱÔÚÒ³Ãæ²»Ìáʾ´íÎóÐÅÏ¢
if(!@include_once(S_ROOT.'./config.php')) {
//Èç¹ûÕÒ²»µ½µÄ»°ÔòÖض¨Ïòµ½°²×°Îļþ
header("Location: install/index.php");
exit();
}
//ͨÓú¯ÊýÎļþ£¬¾ßÌ庯ÊýÔÚ½éÉÜʱ¼ä»áÒ»Ò»½âÊÍ
include_once(S_ROOT.'./source/function_common.php');
//ʱ¼ämicrotime()»ñÈ¡º¬ºÁÃëµÄʱ¼ä
$mtime = explode(' ', microtime());
$_SGLOBAL['timestamp'] = $mtime[1];
//$mtime[0]ΪUNIXʱ¼ä´Á£¨ÕûÐΣ©£¬ $mtime[0]ΪºÁÃë
$_SGLOBAL['supe_starttime'] = $_SGLOBAL['timestamp'] + $mtime[0];
//get_magic_quotes_gpc¼ì²âPHP.INIÅä
Ïà¹ØÎĵµ£º
PhpArtile
¹Ù·½£ºhttp://www.21ds.net/
Õâ¸öËãÊǹúÄÚphpCmsµÄ×æ×ÚÁË£¬PAÓÉ PHP ÓïÑÔ¿ª·¢, ʹÓà MySQL Êý¾Ý¿â±£´æÊý¾Ý ,ΪÖÐСÐÍÍøÕ¾·¢±íÎÄÕÂ, ´æ·Å×ÊÁÏ, ÐÂÎÅ·¢²¼Ìṩһ¸öÍêÃÀµÄ½â¾ö·½°¸¡£
×öÁ˺ü¸ÄêÁË£¬3.0³Ù³Ù»¹ÔÚ¿ª·¢ÖУ¬½ñÄê³öÁË2.1»ðÁËÒ»Õó£¬ÓÖϨÃðÁË£¬ÒÔÇ°ÓõÄÈËͦ¶àµÄ£¬ÏÖÔÚ»ù±¾ÉÏûÂäÁË¡£
......
Centos ÀïµÄ yum ÔÚÏß°²×°ºÜÂý.ÒÔÏÂÊÇÌ滻ΪÖйúCentOS¾µÏñ·þÎñÆ÷!
Öйú¹Ù·½¾µÏñÍøÕ¾: http://centos.ustc.edu.cn/
/* ʹÓÃ˵Ã÷ */
cd /etc/yum.repos.d[½øÈëyum.repos.dĿ¼]
mv CentOS-Base.repo CentOS-Base.repo.save[ÐÞ¸ÄÔ´ÎļþÃû³Æ±¸·Ý]
wget http://centos.ustc.edu.cn/CentOS-Base.repo.5[ÏÂÔØ]
mv CentOS-Ba ......
Ä£ÐÍ¿ò¼Ü
¿ò¼Ü˼Ïë¾ÍÊÇÌṩһÖÖ¿ÉÒÔÔÚ¶à¸öÓ¦ÓóÌÐòÖÐʹÓõÄÉè¼Æ¡£ËùÓÐÓ¦ÓóÌÐò¶¼ÓдóÁ¿Í¨ÓõĻù±¾ÄÚÈÝ —— ¾ßÌåµØ˵£¬¾ÍÊÇijÀàÓëÊý¾Ý¿âµÄ½Ó¿Ú¡¢Ä³Ð©Ó¦ÓóÌÐòÂß¼¡¢Ó¦ÓóÌÐò³ÊÏÖ¸øÓû§µÄÄÚÈݵȡ£Èç¹ûÄú±àд¹ýÐí¶à PHP Ó¦ÓóÌÐò£¬Ôò»áÖªµÀÕâЩ»ù±¾ÄÚÈÝÊÇʲô¡£Äú¿ÉÄÜÒѾ±àд¹ýÒ»×麯Êý»ò´ÓÊý¾Ý¿âÖжÁÈ¡Êý¾ÝºÍÏòÊ ......
¡¡¡¡PHP ÖУ¬Êý¾Ýͨ³£¶¼ÊÇ´æ´¢ÔÚMySQLÊý¾Ý¿âµ±Öеġ£µ«ÊÇÓÐЩʱºò£¬ÎÒÃÇ»¹ÊÇÐèҪʹÓÃPHP¶ÁдһЩ±¾µØÎļþ¡£±ÈÈçÉú³É¾²Ì¬Ò³Ãæ»òÕßÊý¾ÝµÄ±¾µØ»º´æ¡£
¡¡¡¡PHP5+ ÌṩÁËÒ»ÖÖ·½·¨ file_put_contents(file,data,mode,context)£¬Ëü½«Ò»¸ö×Ö·û´®Ð´ÈëÎļþ£¬·µ»ØдÈëµ½ÎļþÄÚÊý¾ÝµÄ×Ö½ÚÊý¡£ºÍÒÀ´Îµ÷Óà fopen()£¬fwr ......
1.ʹÓÃip2long() ºÍlong2ip()º¯ÊýÀ´°ÑIPµØַת»¯³ÉÕûÐÍ´æ´¢µ½Êý¾Ý¿âÀï¡£
¡¡¡¡ÕâÖÖ·½·¨°Ñ´æ´¢¿Õ¼ä½µµ½Á˽ӽüËÄ·ÖÖ®Ò»(char(15)µÄ15¸ö×Ö½Ú¶ÔÕûÐεÄ4¸ö×Ö½Ú)£¬¼ÆËãÒ»¸öÌض¨µÄµØÖ·ÊDz»ÊÇÔÚÒ»¸öÇø¶ÎÄÚÒ³¸ü¼òµ¥ÁË£¬¶øÇÒ¼Ó¿ìÁËËÑË÷ºÍÅÅÐòµÄËÙ¶È(ËäÈ»ÓÐʱ½ö½öÊÇ¿ìÁËÒ»µã)¡£
¡¡¡¡2.ÔÚÑéÖ¤EmailµØÖ·µÄʱºòʹÓÃcheckdnsrr() º¯ÊýÑéÖ¤ ......