• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP log_message函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中log_message函数的典型用法代码示例。如果您正苦于以下问题:PHP log_message函数的具体用法?PHP log_message怎么用?PHP log_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了log_message函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     //error_reporting(E_ALL);
     log_message('debug', "Weixinapi Class Initialized.");
     $this->CI =& get_instance();
     $this->valid();
 }
开发者ID:haohailuo,项目名称:Codeigniter-Wechat,代码行数:7,代码来源:Weixinapi.php


示例2: __construct

 function __construct()
 {
     parent::__construct();
     // Load language relations file
     $this->config->load('languages');
     $this->lang_path = APPPATH . '../lang';
     $this->langname = $this->config->item('default_language');
     if (!is_dir($this->lang_path)) {
         log_message('ERROR', 'Language path is not a directory');
         die;
     }
     // Defined language?
     $lang_rels = $this->config->item('lang_rels');
     if (!isset($lang_rels[$this->langname])) {
         log_message('ERROR', 'Language ' . $this->langname . ' not registered');
         $this->langname = 'en';
     }
     $this->lang_relations = $lang_rels[$this->langname];
     if (FALSE === ($this->lang_contents = $this->parse_language($this->langname))) {
         $this->extended_logs->message('ERROR', 'Language ' . $this->langname . ' not found');
         $this->langname = 'en';
         $this->lang_contents = $this->parse_language($this->langname);
     }
     // Locale
     $this->setlocale();
     // Set CodeIgniter language
     $this->set_ci_language();
 }
开发者ID:julien2512,项目名称:agendav,代码行数:28,代码来源:i18n.php


示例3: __construct

 /**
  * Class constructor
  * @return    void
  */
 public function __construct()
 {
     $CFG =& load_class('Config', 'core');
     log_message('info', 'Hooks Class Initialized');
     if ($CFG->item('enable_hooks') === FALSE) {
         return;
     }
     if (file_exists(COMMONPATH . 'config/hooks.php')) {
         include COMMONPATH . 'config/hooks.php';
     }
     if (file_exists(COMMONPATH . 'config/' . ENVIRONMENT . '/hooks.php')) {
         include COMMONPATH . 'config/' . ENVIRONMENT . '/hooks.php';
     }
     if (file_exists(APPPATH . 'config/hooks.php')) {
         include APPPATH . 'config/hooks.php';
     }
     if (file_exists(APPPATH . 'config/' . ENVIRONMENT . '/hooks.php')) {
         include APPPATH . 'config/' . ENVIRONMENT . '/hooks.php';
     }
     if (!isset($hook) || !is_array($hook)) {
         return;
     }
     $this->hooks =& $hook;
     $this->enabled = TRUE;
 }
开发者ID:patilstar,项目名称:HMVC-WITH-CI,代码行数:29,代码来源:Core_Hooks.php


示例4: db_connect

 /**
  * Non-persistent database connection
  *
  * @param	bool	$persistent
  * @return	resource
  */
 public function db_connect($persistent = FALSE)
 {
     $error = NULL;
     $conn_id = $persistent === TRUE ? sqlite_popen($this->database, 0666, $error) : sqlite_open($this->database, 0666, $error);
     isset($error) && log_message('error', $error);
     return $conn_id;
 }
开发者ID:segaz2002,项目名称:Codeigniter,代码行数:13,代码来源:sqlite_driver.php


示例5: extension

 /**
  * Load Extension
  *
  * This function loads the specified extension.
  *
  * @access	public
  * @param	array	$extensions	specified extension
  * @return	void
  */
 public function extension($extensions = array())
 {
     if (!is_array($extensions)) {
         $extensions = array($extensions);
     }
     foreach ($extensions as $extension) {
         $plugin = strtolower(str_replace('.php', '', $extension));
         // If the extension is already loaded, continue on.
         if (isset($this->_ci_extensions[$extension])) {
             continue;
         }
         // Attempt to load the extension.
         if (file_exists($extension_path = sprintf(APPPATH . 'extend/%s/main.php', $extension))) {
             include $extension_path;
         } else {
             if (file_exists($extension_path = sprintf(BASEPATH . 'extend/%s/main.php', $extension))) {
                 include $extension_path;
             } else {
                 show_error(sprintf('Unable to load the requested file: extend/%s/main.php', $extension));
             }
         }
         // Initialize the plugin and log it.
         $this->_ci_extensions[$extension] = new $plugin();
         log_message('debug', sprintf('Extension loaded: %s', $plugin));
     }
 }
开发者ID:rexcarnation,项目名称:XtraUpload-1,代码行数:35,代码来源:XU_Loader.php


示例6: __construct

 /**
  * Constructor - Sets Preferences
  *
  * The constructor can be passed an array of config values
  */
 public function __construct($config = array())
 {
     if (count($config) > 0) {
         $this->initialize($config);
     }
     log_message('debug', "FTP Class Initialized");
 }
开发者ID:hdiprinzio,项目名称:bonus,代码行数:12,代码来源:Ftp.php


示例7: CI_Pagination

 /**
  * Constructor
  *
  * @access	public
  * @param	array	initialization parameters
  */
 function CI_Pagination($params = array())
 {
     if (count($params) > 0) {
         $this->initialize($params);
     }
     log_message('debug', "Pagination Class Initialized");
 }
开发者ID:bayugyug,项目名称:unov2,代码行数:13,代码来源:Pagination.php


示例8: load

 /**
  * Load a language file
  *
  * @access	public
  * @param	mixed	the name of the language file to be loaded. Can be an array
  * @param	string	the language (english, etc.)
  * @return	mixed
  */
 function load($langfile = '', $idiom = '', $return = FALSE)
 {
     $langfile = str_replace(EXT, '', str_replace('_lang.', '', $langfile)) . '_lang' . EXT;
     if (in_array($langfile, $this->is_loaded, TRUE)) {
         return;
     }
     if ($idiom == '') {
         $CI =& get_instance();
         $deft_lang = $CI->config->item('language');
         $idiom = $deft_lang == '' ? 'english' : $deft_lang;
     }
     // Determine where the language file is and load it
     if (file_exists(APPPATH . 'language/' . $idiom . '/' . $langfile)) {
         include APPPATH . 'language/' . $idiom . '/' . $langfile;
     } else {
         if (file_exists(BASEPATH . 'language/' . $idiom . '/' . $langfile)) {
             include BASEPATH . 'language/' . $idiom . '/' . $langfile;
         } else {
             show_error('Unable to load the requested language file: language/' . $idiom . '/' . $langfile);
         }
     }
     if (!isset($lang)) {
         log_message('error', 'Language file contains no data: language/' . $idiom . '/' . $langfile);
         return;
     }
     if ($return == TRUE) {
         return $lang;
     }
     $this->is_loaded[] = $langfile;
     $this->language = array_merge($this->language, $lang);
     unset($lang);
     log_message('debug', 'Language file loaded: language/' . $idiom . '/' . $langfile);
     return TRUE;
 }
开发者ID:jaimeivan,项目名称:smart-restaurant,代码行数:42,代码来源:Language.php


示例9: info_post

 public function info_post()
 {
     //{{{
     $this->load->library('user_auth');
     $this->load->model('Follow', 'follow_m', TRUE);
     try {
         if (!$this->user_auth->is_user_login()) {
             $this->response(array('error' => 'user did not login yet.'), 500);
         } else {
             $object_user_id = $this->session->userdata('user_id');
             $user_id = $this->post('user_id', TRUE);
             $has_follow = $this->post('has_follow', TRUE);
             switch ($has_follow) {
                 case false:
                     $func_name = 'do_follow';
                     break;
                 case true:
                     $func_name = 'do_follow';
                     break;
             }
             $this->follow_m->{$func_name}($user_id, $object_user_id);
             $this->response(array(), 200);
         }
     } catch (Exception $e) {
         log_message('error', $e->getMessage());
         $this->response(array('error' => ''), 500);
     }
 }
开发者ID:nnrv1ncentsh1,项目名称:MADA,代码行数:28,代码来源:follow_api.php


示例10: __construct

 /**
  * 构造函数
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     /** 主题皮肤所在路径 */
     $this->themes_dir = FCPATH . ST_THEMES_DIR . DIRECTORY_SEPARATOR;
     log_message('debug', "STBLOG: Themes Model Class Initialized");
 }
开发者ID:Ethan0814,项目名称:STBlog,代码行数:13,代码来源:themes_mdl.php


示例11: get_access_token

 public function get_access_token($provider, $grant = 'authorization_code', $code){
   if (! $provider) {
     log_message('error', __FILE__.' '.__LINE__.' Provider details not provided by the client for fetching Acess Token.');
     return FALSE;
   }
   
   $params = [
     'grant_type'    => $grant,
     'client_id'     => self::$SOCIAL_MEDIA_CREDENTIALS[$provider]['client_id'],
     'client_secret' => self::$SOCIAL_MEDIA_CREDENTIALS[$provider]['client_secret'],
     'redirect_uri'  => $this->redirect_url,
     'code'          => $code
   ];
   $params_string = http_build_query($params,'','&');
   
   $access_token_url = self::$SOCIAL_MEDIA_CREDENTIALS[$provider]['graph_url'].'oauth/access_token';
   
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, $access_token_url);
   curl_setopt($ch, CURLOPT_POST, count($params));
   curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);
   curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
   curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
   curl_setopt($ch, CURLOPT_FAILONERROR, FALSE);
   curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 100);
   $output = curl_exec($ch);
   curl_close($ch);
   
   parse_str($output, $output_arr); 
   
   return $output_arr;
 }
开发者ID:nits41089,项目名称:lmc,代码行数:34,代码来源:Oauth.php


示例12: buy_product

 public function buy_product($id, $amount, $product, $user_id, $user_money)
 {
     //Market Update
     $this->db->set('amount', 'amount -' . $amount, FALSE);
     $this->db->where('id', $id);
     $this->db->update('market');
     //Company Update
     $this->db->select('money');
     $query = $this->db->get_where('companies', array('id' => $product->company_id), 1);
     if ($query->num_rows() === 1) {
         foreach ($query->result() as $company) {
         }
     } else {
         $return = NULL;
         log_message('error', 'function buy_product() in /megapublik/models/market_m.php has received bad data for $product->company_id.');
     }
     $company_money = unserialize($company->money);
     $currency_money = money($company_money, $product->currency);
     $new_money[$product->currency] = round($currency_money + $amount * $product->price, 2);
     $company_money = array_merge($company_money, $new_money);
     $this->db->set('money', serialize($company_money));
     $this->db->where('id', $product->company_id);
     $this->db->update('companies');
     //User Update
     $currency_money = money($user_money, $product->currency);
     $new_money[$product->currency] = round($currency_money - $amount * $product->price, 2);
     $user_money = array_merge($user_money, $new_money);
     $this->db->set('money', serialize($user_money));
     $this->db->where('id', $user_id);
     $this->db->update('users');
     log_message('debug', number_format($amount, 0, '.', ',') . ' products bought with type "' . $product->type . '" and price "' . number_format($product->price, 2, '.', ',') . ' ' . $product->currency . '" by user with ID "' . $user_id . '"');
     return TRUE;
 }
开发者ID:Razican,项目名称:MegaPublik,代码行数:33,代码来源:market_m.php


示例13: index

 public function index()
 {
     // Setup Spark
     $vrs = '0.0.1';
     // Update to your spark version
     $this->load->spark("codeigniter-payments/{$vrs}");
     $gateway = 'bluepay';
     // Change to reflect the identifier (Transaction ID from previous transaction)
     // Required for CAPTURE, REFUND, and VOID
     $identifier = '100000000000';
     // Only used for AUTH and ONEOFF
     $info = array('cc_number' => '4111111111111111', 'cc_code' => '203', 'cc_exp' => '022016', 'amt' => '25.00', 'email' => '[email protected]', 'first_name' => 'Bill', 'last_name' => 'Testing', 'street' => '181 Something Street', 'city' => 'Tompkinsville', 'state' => 'KY', 'country' => 'US', 'postal_code' => '42167');
     /**
      * INSTRUCTIONS: Uncomment the line below that you want to test out.
      */
     $response = 'Uncomment the line you want to test.';
     // One Off Payment Example
     // $response = $this->payments->oneoff_payment($gateway, $info);
     // Auth
     // $response = $this->payments->authorize_payment($gateway, $info);
     // Capture
     //$response = $this->payments->capture_payment($gateway, array('identifier' => $identifier));
     // Refund
     // $response = $this->payments->refund_payment($gateway, array('identifier' => $identifier));
     // Void Payment Example
     // $response = $this->payments->void_payment($gateway, array('identifier' => $identifier));
     // Display the Outcome
     echo "<pre>";
     print_r($response);
     echo "</pre>";
     // Just so you can check it out later
     // Probably want to store some of this information in a database
     log_message('error', 'GATEWAY RESPONSE!!');
     log_message('error', json_encode($response));
 }
开发者ID:blekedeg,项目名称:lbhpers,代码行数:35,代码来源:bluepay_examples.php


示例14: authentication_user

 function authentication_user($password)
 {
     try {
         log_message('debug', "AUTHENTICATION");
         $this->load->model('dto/DtoUser');
         $this->load->model('dao/DaoUser');
         $user = new DtoUser();
         $userDao = new DaoUser();
         $user->setUsername($this->input->post('username', TRUE));
         $user->setPassword(md5($this->input->post('password', TRUE)));
         $result = $userDao->login($user);
         if ($result) {
             foreach ($result as $row) {
                 $user->setUsername($row->username);
                 $user->setUserid($row->userid);
                 $user->setUsertype($row->usertype);
                 $this->session->set_userdata('logged_in', $user);
                 $this->session->set_userdata('username', $this->encryption->encrypt($user->getUsername()));
                 $this->session->set_userdata('userid', $this->encryption->encrypt($user->getUserid()));
                 $this->session->set_userdata('usertype', $user->getUsertype());
                 return TRUE;
             }
         } else {
             $this->form_validation->set_message('authentication_user', 'Invalid username or password. Please try again.');
             return false;
         }
     } catch (Exception $ex) {
         log_message('debug', $ex->getMessage());
     }
 }
开发者ID:vuthea,项目名称:SmartMartPro,代码行数:30,代码来源:Auth.php


示例15: __construct

 public function __construct()
 {
     // Assign the main database object to $this->db
     $CI =& get_instance();
     $this->db =& $CI->db;
     log_message('debug', 'Database Forge Class Initialized');
 }
开发者ID:jemmy655,项目名称:TomatoCart-v2,代码行数:7,代码来源:DB_forge.php


示例16: do_menu

 public function do_menu()
 {
     // start the unordered list
     $output = '<ul>';
     // get an array of enabled desklets from the database
     $enabled_desklets = $this->Database->get_enabled_desklets();
     // load the launcher.json config file for each enabled desklet and
     // then decode it into an array
     foreach ($enabled_desklets as $desklet => $array) {
         $launcher_json = 'assets/desktop/desklets/' . $desklet . '/launcher.json';
         if (file_exists($launcher_json)) {
             $handle = fopen($launcher_json, 'r');
             $json = fread($handle, filesize($launcher_json));
             fclose($handle);
             $desklets[$desklet] = json_decode($json, true);
         } else {
             log_message('error', 'The desklet "' . $desklet . '" was marked as enabled, but its launcher.json could not be found in ' . $launcher_json);
         }
     }
     // make a list item for each installed desklet
     foreach ($desklets as $desklet) {
         $output .= '<li><a href="' . site_url('assets/desktop/desklets/') . '/' . $desklet['name'] . '/" alt="' . $desklet['name'] . '" ><img src="' . site_url('assets/desktop/desklets') . '/' . $desklet['name'] . '/' . $desklet['icon'] . '" alt="' . $desklet['title'] . '" title="' . $desklet['title'] . '"></a></li>';
     }
     // if no desklets are found/installed, tell the user
     if (empty($desklets)) {
         $output .= '<li>No desklets could be found.</li>';
     }
     // end the unordered list
     $output .= '</ul>';
     // echo the output
     echo $output;
 }
开发者ID:ReedME,项目名称:heatCMS,代码行数:32,代码来源:desktop.php


示例17: Controller

 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     // Assign all the class objects that were instantiated by the
     // bootstrap file (CodeIgniter.php) to local class variables
     // so that CI can run as one big super object.
     foreach (is_loaded() as $var => $class) {
         $this->{$var} =& load_class($class);
     }
     // In PHP 5 the Loader class is run as a discreet
     // class.  In PHP 4 it extends the Controller @PHP4
     if (is_php('5.0.0') == TRUE) {
         $this->load =& load_class('Loader', 'core');
         $this->load->_base_classes =& is_loaded();
         $this->load->_ci_autoloader();
     } else {
         $this->_ci_autoloader();
         // sync up the objects since PHP4 was working from a copy
         foreach (array_keys(get_object_vars($this)) as $attribute) {
             if (is_object($this->{$attribute})) {
                 $this->load->{$attribute} =& $this->{$attribute};
             }
         }
     }
     log_message('debug', "Controller Class Initialized");
 }
开发者ID:unisexx,项目名称:adf16,代码行数:31,代码来源:Controller.php


示例18: purge_cache

 public function purge_cache($method, $cache_pages, $post_id = null, $user_id = null)
 {
     log_message('error', 'Invoked method: ' . $method);
     $caches = $this->CI->config->item('cacher');
     foreach ($caches[$method] as $cache) {
         if ($cache['paged'] != 0) {
             for ($i = 0; $i <= $cache_pages; $i++) {
                 $key = $cache['method'] . $i;
                 if (!$this->CI->cache->memcached->delete(sha1($key))) {
                     log_message('error', 'cache key: ' . $key);
                 }
             }
         } else {
             if ($cache['post_id'] == 1) {
                 $key = $cache['method'] . $post_id;
             } elseif ($cache['user_id'] == 1) {
                 $key = $cache['method'] . $user_id;
             } else {
                 $key = $cache['method'];
             }
             if ($this->CI->cache->memcached->delete(sha1($key))) {
                 log_message('error', 'cache key: ' . $key);
             }
         }
     }
 }
开发者ID:SimTabi,项目名称:tribble,代码行数:26,代码来源:cachehandler.php


示例19: up

 public function up()
 {
     $this->load->helper('date');
     $is_datetime = strtolower(Model::TIMESTAMP_FORMAT) == 'datetime';
     foreach ($this->tables() as $name => $prop) {
         $keys = [];
         $is_auto_timestamp = element(self::FLAG_AUTOTIMESTAMP, $prop, true);
         if ($schemas = element(self::DB_SCHEMAS, $prop, [])) {
             if (true === $is_auto_timestamp) {
                 $this->_auto_timestamp = true;
                 $creator = ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'default' => null];
                 if ($is_datetime) {
                     $timestamp = ['type' => 'datetime', 'default' => '0000-00-00 00:00:00'];
                 } else {
                     $timestamp = ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'default' => 0];
                 }
                 $schemas[Model::CREATION_KEY . '_by'] = $creator;
                 $schemas[Model::CREATION_KEY . '_at'] = $timestamp;
                 $schemas[Model::MODIFICATION_KEY . '_by'] = $creator;
                 $schemas[Model::MODIFICATION_KEY . '_at'] = $timestamp;
             }
             if (false === element(self::FLAG_DESTRUCTIVE, $prop, false)) {
                 $schemas[Model::DELETION_KEY] = ['type' => 'tinyint', 'constraint' => 1, 'unsigned' => true, 'DEFAULT' => 0];
             }
             foreach ($schemas as $column => $schema) {
                 if (isset($schema['key'])) {
                     $keys[$column] = $schema['key'];
                     unset($schema['key']);
                 }
             }
             if (true === element(self::FLAG_OVERRIDE, $prop, true)) {
                 $this->dbforge->drop_table($name, true);
             }
             $this->dbforge->add_field($schemas);
             if (!empty($keys)) {
                 foreach ($keys as $key => $value) {
                     $this->dbforge->add_key($key, $value);
                 }
             }
             if (false === element(self::FLAG_ALTERTABLE, $prop, false)) {
                 if ($this->dbforge->create_table($name, true, ['engine' => 'InnoDB'])) {
                     log_message('info', 'Migration successfully create table ' . $name);
                 } else {
                     log_message('error', 'Migration failed to create table ' . $name);
                 }
             }
         }
         if ($data = element(self::DB_DATA, $prop, [])) {
             if (true === $is_auto_timestamp) {
                 $now = $is_datetime ? date('Y-m-d H:i:s') : time();
                 for ($d = 0; $d < count($data); $d++) {
                     $data[$d] += [Model::CREATION_KEY . '_by' => null, Model::CREATION_KEY . '_at' => $now, Model::MODIFICATION_KEY . '_by' => null, Model::MODIFICATION_KEY . '_at' => $now];
                 }
             }
             if ($this->db->insert_batch($name, $data)) {
                 log_message('info', 'Migration successfully insert data to table ' . $name);
             }
         }
     }
 }
开发者ID:projek-xyz,项目名称:ci-common,代码行数:60,代码来源:Migration.php


示例20: wpci_template

function wpci_template($default)
{
    log_message('debug', "Default template is {$default}");
    $template = $default;
    if (is_codeigniter()) {
        global $RTR;
        // application/class/action template
        if ($path = template_exists($RTR->fetch_app() . '/' . $RTR->fetch_class() . '/' . $RTR->fetch_method() . EXT)) {
            $template = $path;
        } else {
            if ($path = template_exists($RTR->fetch_app() . '/' . $RTR->fetch_class() . EXT)) {
                $template = $path;
            } else {
                if ($path = template_exists($RTR->fetch_class() . '/' . $RTR->fetch_method() . EXT)) {
                    $template = $path;
                } else {
                    if ($path = template_exists($RTR->fetch_class() . EXT)) {
                        $template = $path;
                    } else {
                        if ($path = template_exists($RTR->fetch_app() . EXT)) {
                            $template = $path;
                        } else {
                            if ($path = template_exists('codeigniter' . EXT)) {
                                $template = $path;
                            }
                        }
                    }
                }
            }
        }
    }
    log_message('debug', "Loading template {$template}");
    return $template;
}
开发者ID:asalce,项目名称:wp-ci,代码行数:34,代码来源:templates.php



注:本文中的log_message函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP log_moderator_action函数代码示例发布时间:2022-05-15
下一篇:
PHP log_log函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap