Entries by Eagle

wordpress数据库操作类wpdb相关注释说明

以下相关代码注释可能不全面,有不对的地方,仅做参考;   $this->dbpassword = $dbpassword; $this->dbname = $dbname; $this->dbhost = $dbhost; $this->db_connect(); } //类析构函数 function __destruct() { return true; } //设置编码变量 function init_charset() { if ( function_exists(‘is_multisite’) && is_multisite() ) { $this->charset = ‘utf8’; if ( defined( ‘DB_COLLATE’ ) && DB_COLLATE ) $this->collate = DB_COLLATE; else $this->collate = ‘utf8_general_ci’; } elseif ( defined( ‘DB_COLLATE’ ) ) […]

wp项目setting文件部分代码解析

刚接触wp,以下内容的注解可能会有不到位的地方,仅作参考: define( ‘WPINC’, ‘wp-includes’ );//定义include文件夹目录 // Include files required for initialization. require( ABSPATH . WPINC . ‘/load.php’ );//加载常用函数文件 require( ABSPATH . WPINC . ‘/default-constants.php’ ); require( ABSPATH . WPINC . ‘/version.php’ );//版本参数信息文件 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE. wp_initial_constants( );//初始化常量信息 // Check for the required PHP version and for […]

简单的图表效果css同样可以实现

通常生成图表可能会用到以下几种方法: 1. PHP扩展 (JpGraph、ChartDirector) 2. JavaScript (Flot、 Flotr、Emprise JavaScript Charts 、PlotKit) 3. Flash (Open Flash Chart 、AmCharts、PHP/SWF Charts 、FusionCharts) 4. 其他 (Visifire、JFreeChart) 其实简单的图表效果css同样可以实现: CSS: <style type=”text/css” media=”screen”> *{ margin: 0; padding: 0; list-style-type: none;} body { font-family: Helvetica, Arial, sans-serif; color: #333; } a { color: #000; text-decoration: none; font-weight: bold; } a:hover { color: […]