phpʵÏÖÍøÕ¾²å¼þ»úÖƵķ½·¨
ÕâЩÌìÏë×÷Ò»¸öÔÚÍøÕ¾ÖÐʵÏÖ²å¼þµÄ¹¦ÄÜ£¬¹È¸èÁËһϣ¬·¢ÏÖһƪÎÄÕ¸оõ¶ÔÎÒ°ïÖúºÜ´ó£¬Ìû³öÀ´ºÍ´ó¼Ò·ÖÏí£¬·Ï»°²»¶à˵£¬Ö±½ÓÌû³ö´úÂ빩´ó¼Ò·ÖÎö£º
Ê×ÏÈÊDzå¼þµÄ¹ÜÀíÀàµÄʵÏÖ£º
<?
/**
* STBLOG PluginManager Class
*
* ²å¼þ»úÖƵÄʵÏÖºËÐÄÀà
*
* @package STBLOG
* @subpackage Libraries
* @category Libraries
* @author Saturn
* @link http://www.cnsaturn.com/
*/
class PluginManager
{
/**
* ¼àÌýÒÑ×¢²áµÄ²å¼þ
*
* @access private
* @var array
*/
private $_listeners = array();
/**
* ¹¹Ô캯Êý
*
* @access public
* @return void
*/
public function __construct()
{
#ÕâÀï$pluginÊý×é°üº¬ÎÒÃÇ»ñÈ¡ÒѾÓÉÓû§¼¤»îµÄ²å¼þÐÅÏ¢
#ΪÑÝʾ·½±ã£¬ÎÒÃǼٶ¨$pluginÖÐÖÁÉÙ°üº¬
#$plugin = array(
# 'name' => '²å¼þÃû³Æ',
# 'directory'=>'²å¼þ°²×°Ä¿Â¼'
#);
$plugins = get_active_plugins();#Õâ¸öº¯ÊýÇë×ÔÐÐʵÏÖ
if($plugins)
{
foreach($plugins as $plugin)
{//¼Ù¶¨Ã¿¸ö²å¼þÎļþ¼ÐÖаüº¬Ò»¸öactions.phpÎļþ£¬ËüÊDzå¼þµÄ¾ßÌåʵÏÖ
if (@file_exists(STPATH .'plugins/'.$plugin['directory'].'/actions.php'))
{
include_once(STPATH .'plugins/'.$plugin['directory'].'/actions.php');
$class = $plugin['name'].'_actions';
if (class_exists($class))
{
//³õʼ»¯ËùÓвå¼þ
new $class($this);
}
}
}
}
#´Ë´¦×öЩÈÕÖ¾¼Ç¼·½ÃæµÄ¶«Î÷
}
/**
* ×¢²áÐèÒª¼àÌýµÄ²å¼þ·½·¨£¨¹³×Ó£©
*
* @param string $hook
* @param object $reference
* @param string $method
*/
function register($hook, &$reference, $method)
{
//»ñÈ¡²å¼þҪʵÏֵķ½·¨
$key = get_class($reference).'-&
Ïà¹ØÎĵµ£º
Memcacheº¯Êý¿âÊÇÔÚPECL(PHP Extension Community Library)ÖУ¬Ö÷Òª×÷ÓÃÊǴ´óÈÝÁ¿µÄÄÚ´æÊý¾ÝµÄÁÙʱ´æ·ÅÇøÓò£¬ÔÚ·Ö²¼Ê½µÄʱºò×÷ÓÃÌåÏֵķdz£Ã÷ÏÔ£¬·ñÔò²»½¨ÒéʹÓá£
memcacheº¯ÊýËùÓеķ½·¨ÁбíÈçÏ£º
²Î¿¼http://www.php.net/manual/zh/function.Memcache-add.php
Memcache::add - Ìí¼ÓÒ»¸öÖµ£¬Èç¹ûÒѾ´æÔÚ£¬Ôò·µ»Øf ......
×î½üÉÏÍøÕÒÁËһЩ¹ØÓÚ±¸·ÝmysqlÊý¾Ý¿âµÄ·½·¨£¬Ö÷Òª¾ÍÊÇͨ¹ýÍøÒ³µÄ·½·¨µ¼³öÊý¾Ý¿âµÄsql Îļþ£¬ÕÒµ½¸ö²»´íµÄ´úÂ룬µ«·¢ÏÖÖÐÎĵ¼³ö»áÂÒÂ룬ÓÚÊÇÉÔ΢ÐÞ¸ÄÁËһϣ¬ÏÂÃæÊDZ¸·ÝµÄ´úÂë
view plaincopy to clipboardprint?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml ......
1.ÓÃJSµ÷ÓÃÎļþcount.php ÔÚÄãÐèÒª¼ÓÈëͳ¼ÆµÄµÄµØ·½¼ÓÈë<script src="count.php"></script> ʵ¼ÊÔËÓÃÖÐ×¢ÒâÐ޸ķ¾¶£¡
2.php»·¾³±ØÐëÖ§³Öputenv()º¯Êý,¿ÉÒÔͳ¼Æ×òÈÕ·ÃÎÊ£¬½ñÈÕ·ÃÎÊ£¬ÔÚÏßÈËÊý,Äú·ÃÎʵĴÎÊý¡£
3 . ......
ÔÀ´ÊÇѧjspµÄ£¬µ«ÊǸоõjspÌ«ÄÑÁË£¬¶øÇÒ·¢ÏÖ£¬ÏÖÔڱȽÏÁ÷ÐÐphpÁË£¬php+mysqlµÄ»Æ½ð´îµµ¡£
¿´jspµÄÊéʱ£¬ÊéÉÏ˵£¬jsp±ÈphpºÃ£¬ÏÖÔÚ¿´phpµÄÊ飬˵php±ÈjspºÃ£¬ÎÒÏëÕâÒ²ÊÇÖÇÕß¼ûÖÇ£¬ÈÊÕß¼ûÈÊ°É¡£
ÇìÐÒ×Ô¼ºÑ§php·¢ÏÖÁËÒ»±¾ºÃÊ飬ÍƼö¸ø´ó¼Ò£¬¾ÍÊǽ²µÄºÜÏêϸ¡£
Ó¢ÎÄÃû¡¶PHP and MySQL EXAMPLE¡· ÃÀ¹ ......
HTML´úÂë
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/>
<input name="ID_D ......