当前位置: 首页>>代码示例>>PHP>>正文


PHP FB::log方法代码示例

本文整理汇总了PHP中FB::log方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::log方法的具体用法?PHP FB::log怎么用?PHP FB::log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FB的用法示例。


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

示例1: checkContentDuration

 public function checkContentDuration($id)
 {
     $path = "/var/www/html/ediacademy/mediagg/contenuti/{$id}/{$id}.mp4";
     $getID3 = new getID3();
     $file = $getID3->analyze($path);
     FB::log($file);
     return (int) $file['playtime_seconds'];
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:8,代码来源:content.php

示例2: build

function build(&$query) {
    $segments = array();

    if (isset($query['view'])) {
        $segments[] = $query['view'];
        unset($query['view']);
    }

    if (isset($query['id'])) {
        $segments[] = $query['id'];
        unset($query['id']);
    }

    if (isset($query['type'])) {
        $segments[] = $query['type'];
        unset($query['type']);
    }

    if (isset($query['alias'])) {
        $segments[] = $query['alias'];
        unset($query['alias']);
    }

    if (isset($query['unit'])) {
     //   $segments[] = $query['alias'];
        unset($query['unit']);
    }

    FB::log($segments, "segments" );
    return $segments;
}
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:31,代码来源:router.php

示例3: passwordExists

function passwordExists($dbConn, $username, $password)
{
    $isValid = false;
    $dbQuery = "SELECT Password FROM USERS WHERE Username = '" . $username . "' LIMIT 1";
    FB::info('passwordExists() query: ' . $dbQuery);
    $dbRows = mysqli_query($dbConn, $dbQuery);
    $dbValues = mysqli_fetch_assoc($dbRows);
    $dbPassword = $dbValues['Password'];
    if (password_verify($password, $dbPassword)) {
        $isValid = true;
        FB::log('Password is valid!');
        // Check if the password needs a rehash.
        if (password_needs_rehash($dbPassword, PASSWORD_DEFAULT)) {
            FB::log('Rehashing password!');
            $dbPassword = password_hash($password, PASSWORD_DEFAULT);
            $dbQuery = "UPDATE USERS SET Password = '" . $dbPassword . "' WHERE Username = '" . $username . "'";
            FB::info('Password rehash query: ' . $dbQuery);
            $dbRows = mysqli_query($dbConn, $dbQuery);
            if ($dbRows) {
                FB::log('Password rehash successful!');
            } else {
                FB::error('Password rehash failed: ' . mysqli_error($dbConn));
            }
        }
    }
    return $isValid;
}
开发者ID:Jayme-LB,项目名称:prj666_public,代码行数:27,代码来源:selectQueries.php

示例4: display

 function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     FB::log($this->items);
     $document =& JFactory::getDocument();
     JHtml::_('bootstrap.framework');
     //RS
     JHtml::_('jquery.framework');
     //RS
     JHtml::_('jquery.ui', array('core', 'sortable'));
     //RS
     $document->addStyleSheet('http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css');
     //      Following variables used more than once
     //      $this->sortColumn = $this->state->get('list.ordering');
     //      $this->sortDirection = $this->state->get('list.direction');
     //        $this->searchterms = $this->state->get('filter.search');
     // Set the toolbar
     $this->addToolBar();
     // Set the document
     $this->setDocument();
     // Display the template
     parent::display($tpl);
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:25,代码来源:view.html.php

示例5: addUser

function addUser($dbConn, $username, $password, $email)
{
    // Add user to USERS table.
    $dbQuery = "INSERT INTO USERS(Username, First_name, Last_name, Email, Status, About, Date_joined, Password) " . "VALUES('" . $username . "', '', '', '" . $email . "', 'active', '', CURDATE(), '" . $password . "')";
    FB::info('addUser() query:' . $dbQuery);
    if ($dbResults = mysqli_query($dbConn, $dbQuery)) {
        FB::log('USERS insert success! (I think)');
    } else {
        FB::error('USERS insert failed!');
    }
    $userId = mysqli_insert_id($dbConn);
    // ID of the latest created user.
    FB::info('New User ID: ' . $userId);
    // Add user role for newly created user into USER_ROLES table.
    $dbQuery = "INSERT INTO USER_ROLES(User_Id, Role_Id)" . "VALUES(" . $userId . ", 1)";
    if ($dbResults = mysqli_query($dbConn, $dbQuery)) {
        FB::log('USER_ROLES insert success! (I think)');
    } else {
        FB::error('USER_ROLES insert failed!');
    }
    // Add default avatar for newly created user into IMAGES table.
    $avatar = file('images/default_avatar.png');
    // Default avatar for new users.
    $dbQuery = "INSERT INTO IMAGES(Description, Image, User_Id) " . "VALUES('test', '" . $avatar . "', " . $userId . ")";
    if ($dbResults = mysqli_query($dbConn, $dbQuery)) {
        FB::log('IMAGES insert success! (I think)');
    } else {
        FB::error('IMAGES insert failed!');
    }
}
开发者ID:Jayme-LB,项目名称:prj666_public,代码行数:30,代码来源:insertQueries.php

示例6: post_process

 /**
  * The second last process, should only be getting everything
  * syntaxically correct, rather than doing any heavy processing
  *
  * @author Anthony Short
  * @return $css string
  */
 public static function post_process()
 {
     if ($found = CSS::find_properties_with_value('image-replace', 'url\\([\'\\"]?([^)]+)[\'\\"]?\\)')) {
         foreach ($found[4] as $key => $value) {
             $path = $url = str_replace("\\", "/", unquote($value));
             # If they're getting an absolute file
             if ($path[0] == "/") {
                 $path = DOCROOT . ltrim($path, "/");
             }
             # Check if it exists
             if (!file_exists($path)) {
                 FB::log("ImageReplace - Image doesn't exist " . $path);
             }
             # Make sure it's an image
             if (!is_image($path)) {
                 FB::log("ImageReplace - File is not an image: {$path}");
             }
             // Get the size of the image file
             $size = GetImageSize($path);
             $width = $size[0];
             $height = $size[1];
             // Make sure theres a value so it doesn't break the css
             if (!$width && !$height) {
                 $width = $height = 0;
             }
             // Build the selector
             $properties = "\n\t\t\t\t\tbackground:url({$url}) no-repeat 0 0;\n\t\t\t\t\theight:{$height}px;\n\t\t\t\t\twidth:{$width}px;\n\t\t\t\t\tdisplay:block;\n\t\t\t\t\ttext-indent:-9999px;\n\t\t\t\t\toverflow:hidden;\n\t\t\t\t";
             CSS::replace($found[2][$key], $properties);
         }
         # Remove any left overs
         CSS::replace($found[1], '');
     }
 }
开发者ID:Keukendeur,项目名称:csscaffold,代码行数:40,代码来源:ImageReplace.php

示例7: generateJsonResponse

 public function generateJsonResponse($action, $do, $data)
 {
     $response = '';
     if (JDEBUG == 1 && defined('JFIREPHP')) {
         FB::log("Kunena JSON action: " . $action);
     }
     // Sanitize $data variable
     $data = $this->_db->getEscaped($data);
     if ($this->_my->id) {
         // We only entertain json requests for registered and logged in users
         switch ($action) {
             case 'autocomplete':
                 $response = $this->_getAutoComplete($do, $data);
                 break;
             case 'preview':
                 $body = JRequest::getVar('body', '', 'post', 'string', JREQUEST_ALLOWRAW);
                 $response = $this->_getPreview($body);
                 break;
             case 'pollcatsallowed':
                 // TODO: deprecated
                 $response = $this->_getPollsCatsAllowed();
                 break;
             case 'pollvote':
                 $vote = JRequest::getInt('kpollradio', '');
                 $id = JRequest::getInt('kpoll-id', 0);
                 if (!JRequest::checkToken()) {
                     return false;
                 }
                 $response = $this->_addPollVote($vote, $id, $this->_my->id);
                 break;
             case 'pollchangevote':
                 $vote = JRequest::getInt('kpollradio', '');
                 $id = JRequest::getInt('kpoll-id', 0);
                 if (!JRequest::checkToken()) {
                     return false;
                 }
                 $response = $this->_changePollVote($vote, $id, $this->_my->id);
                 break;
             case 'anynomousallowed':
                 // TODO: deprecated
                 $response = $this->_anynomousAllowed();
                 break;
             case 'uploadfile':
                 $response = $this->_uploadFile($do);
                 break;
             case 'modtopiclist':
                 $response = $this->_modTopicList($data);
                 break;
             case 'removeattachment':
                 $response = $this->_removeAttachment($data);
                 break;
             default:
                 break;
         }
     } else {
         $response = array('status' => '-1', 'error' => JText::_('COM_KUNENA_AJAX_PERMISSION_DENIED'));
     }
     // Output the JSON data.
     return json_encode($response);
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:60,代码来源:kunena.ajax.helper.php

示例8: handle

 public function handle()
 {
     $page = htmlspecialchars(@$_GET['page']);
     FB::log($page);
     $page = $this->getPageIfEmpty($page);
     $view = $this->pageData($page);
     $this->render($view);
 }
开发者ID:jankvak,项目名称:Schedule-of-pain,代码行数:8,代码来源:request_handler.php

示例9: load

 /**
  * Loads an XML file and loads it's variables into the object.
  * Returns true if successful
  * @access public
  * @param $file
  * @return boolean
  */
 public function load($file)
 {
     if (!is_file($file)) {
         return false;
     }
     $this->variables = $this->to_array(simplexml_load_file($file));
     FB::log($this->variables, '$this->variables');
     return true;
 }
开发者ID:pdclark,项目名称:Scaffold,代码行数:16,代码来源:XMLVariables.php

示例10: connect

 public function connect()
 {
     $conf = Kohana::config('gmail');
     FB::log($conf, "conf");
     //{server.example.com:143/novalidate-cert}INBOX
     $this->inbox = imap_open($conf['connection']['hostname'], $conf['connection']['username'], $conf['connection']['password']) or die('Cannot connect to Gmail: ' . imap_last_error());
     FB::log($this->inbox);
     return $this;
 }
开发者ID:vantheman4,项目名称:kohana_gmail,代码行数:9,代码来源:gmail.php

示例11: loadFormData

 protected function loadFormData()
 {
     // Check the session for previously entered form data.
     $data = JFactory::getApplication()->getUserState('com_gglms.edit.file.data', array());
     if (empty($data)) {
         $data = $this->getItem();
     }
     FB::log($data, " loadFormData file");
     return $data;
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:10,代码来源:file.php

示例12: fetch_pdf_template

 /**
  * Combina i dati e il template generando la parte una o più pagine PDF.
  * Nel template deve essere usata la variabile {$data} che contine tutti
  * i valori passati.
  * 
  * @param string $template 
  * @param string $cache_id identificatore univoco per la copia di cache e di compilazione (default NULL).
  * @param bool $check se TRUE Easy Smarty guarda se il file template è cambiato e lo ricompila (default TRUE). Una volta che l'applicazione viene messa in produzione (quindi i template non cambieranno più), il passo di check non è più necessario è consigliabile, per massimizzare  le prestazioni, mettere questo parametro a FALSE.
  * @param bool $cache se TRUE l'output è memorizzato nelle cache (default TRUE).
  * @param int $lifetime tempo di validità (in secondi) della copia in cache; per default è 120 (2 minuti). $cache deve essere impostato a TRUE perché $lifetime abbia significato. Un valore di -1 significa cache senza scadenza. Il valore 0 farà sì che la cache venga sempre rigenerata (è utile solo in fase di test, per disabilitare il caching un metodo più efficiente è impostare $cache a FALSE).
  */
 public function fetch_pdf_template($template, $cache_id = null, $check = true, $cache = false, $lifetime = 120)
 {
     $this->AddPage();
     $smarty = new EasySmarty();
     $smarty->assign('data', $this->_data);
     FB::log($this->_data);
     $html = $smarty->fetch_template($template, $cache_id, $check, $cache, $lifetime);
     FB::log($html);
     $this->writeHTML($html, true, true, true, false, '');
     $this->lastPage();
 }
开发者ID:GGallery,项目名称:MDWEBTV-new,代码行数:22,代码来源:certificatePDF.class.php

示例13: generate_template_tags

 /**
  * Generates HTML to display a given array of entries
  *
  * @param array $entries an array of entries to be formatted
  * @return string HTML markup to display the entry
  */
 protected function generate_template_tags()
 {
     FB::log(debug_backtrace());
     parent::generate_template_tags();
     // Add custom tags here
     foreach ($this->entries as $entry) {
         $entry->comment_count = $this->get_comment_count($entry->entry_id);
         $entry->comment_text = $entry->comment_count === 1 ? 'comment' : 'comments';
         $entry->tags = $this->_format_tags($entry->tags);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:17,代码来源:class.search.inc.php

示例14: logInfo

 public static function logInfo($m)
 {
     $s = self::toStr($m);
     error_log("KLOUDSPEAKER INFO: " . $s);
     if (self::$firebug) {
         FB::log($m);
     }
     if (self::isDebug()) {
         self::$trace[] = $s;
     }
 }
开发者ID:Zveroloff,项目名称:kloudspeaker,代码行数:11,代码来源:Logging.class.php

示例15: login

 public function login($username, $password)
 {
     FB::log($username);
     if (USE_LDAP) {
         try {
             $this->ldap->autentificate($username, $password);
         } catch (LdapException $e) {
             throw new LoginException($e);
         }
     }
 }
开发者ID:jankvak,项目名称:Schedule-of-pain,代码行数:11,代码来源:auth.php


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