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


PHP vd函数代码示例

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


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

示例1: execute

 function execute($params)
 {
     //
     // FUCK! Due limitations of STUPID Smarty I forced to use
     // HTML_RESULT... DAMN!
     //
     $this->set_result_type(HTML_RESULT);
     $this->set_result_tpl('bitpackage:debug/debug_sql.tpl');
     // Init result
     $result = '';
     //
     global $debugger;
     $debugger->msg('SQL query: "' . $params . '"');
     //
     vd($params);
     if (preg_match("/^select/i", trim($params))) {
         global $gBitDb;
         $qr = $gBitDb->mDb->query($params);
         if (!$qr) {
             $result = '<span class="dbgerror">' . $gBitDb->mDb->ErrorMsg() . '</span>';
         } else {
             // Check if result value an array or smth else
             if (is_object($qr)) {
                 // Looks like 'SELECT...' return table to us...
                 // So our result will be 2 dimentional array
                 // with elements count and fields number for element
                 // as dimensions...
                 $first_time = true;
                 $result = '<table id="data">';
                 $result .= '<caption>SQL Results</caption>';
                 while ($res = $qr->fetchRow()) {
                     if ($first_time) {
                         // Form 1st element with field names
                         foreach ($res as $key => $val) {
                             $result .= '<td class="heading">' . $key . '</td>';
                         }
                         $first_time = false;
                     }
                     $result .= '<tr>';
                     // Repack one element into result array
                     $td_eo_class = true;
                     foreach ($res as $val) {
                         $result .= '<td class=' . ($td_eo_class ? "even" : "odd") . '>' . $val . '</td>';
                         $td_eo_class = !$td_eo_class;
                     }
                     //
                     $result .= '</tr>';
                 }
                 $result .= '</table>';
             } else {
                 // Let PHP to dump result :)
                 $result = 'Query result: ' . print_r($qr, true);
             }
         }
     } else {
         $result = "Empty query to tiki DB";
     }
     //
     return $result;
 }
开发者ID:bitweaver,项目名称:debug,代码行数:60,代码来源:debug-command_sql.php

示例2: send

 public function send($ids, $message)
 {
     $url = 'https://android.googleapis.com/gcm/send';
     $fields = ['registration_ids' => $ids, 'data' => $message];
     $headers = ['Authorization: key=' . Config::get('gcm.key.android'), 'Content-Type: application/json'];
     // Open connection
     $ch = curl_init();
     // Set the url, number of POST vars, POST data
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, true);
     curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     // Disabling SSL Certificate support temporarly
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
     curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
     // Execute post
     $result = curl_exec($ch);
     if ($result === false) {
         return false;
     }
     $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
     vd($result);
     vd(Config::get('gcm.key.android'));
     return $status;
 }
开发者ID:schpill,项目名称:standalone,代码行数:26,代码来源:notification.php

示例3: write

 public function write($id, $data)
 {
     $key = $this->normalize($id);
     vd($key);
     $row = $this->db->firstOrCreate(['key' => $key])->setValue($data)->save();
     return true;
 }
开发者ID:schpill,项目名称:standalone,代码行数:7,代码来源:mysession.php

示例4: getUser

 public function getUser()
 {
     $dbTableUser = new Application_Model_DbTable_User();
     $a = $this->self->select('id')->where('id == 33')->order('id ASC');
     $a->fetchAll()->toArray();
     vd($a);
 }
开发者ID:kotmonstr,项目名称:zend,代码行数:7,代码来源:Register.php

示例5: init

 public function init()
 {
     // Define some CLI options
     $getopt = new Zend_Console_Getopt(array('withdata|w' => 'Load database with sample data', 'env|e-s' => 'Application environment for which to create database (defaults to development)', 'help|h' => 'Help -- usage message'));
     try {
         $getopt->parse();
     } catch (Zend_Console_Getopt_Exception $e) {
         // Bad options passed: report usage
         echo $e->getUsageMessage();
         return false;
     }
     // Initialize Zend_Application
     $application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
     // Initialize and retrieve DB resource
     $bootstrap = $application->getBootstrap();
     $bootstrap->bootstrap('db');
     $dbAdapter = $bootstrap->getResource('db');
     // let the user know whats going on (we are actually creating a
     // database here)
     if ('testing' != APPLICATION_ENV) {
         echo 'Writing Database Guestbook in (control-c to cancel): ' . PHP_EOL;
         for ($x = 5; $x > 0; $x--) {
             echo $x . "\r";
             sleep(1);
         }
     }
     vd(1);
 }
开发者ID:kotmonstr,项目名称:zend,代码行数:28,代码来源:PatchController.php

示例6: sendWelcomeEmail

 public function sendWelcomeEmail(Request $request, $id)
 {
     $user = User::findOrFail($id);
     $job = (new SendWelcomeEmail($user))->onQueue('emails');
     $this->dispatch($job);
     vd($user);
 }
开发者ID:sabahtalateh,项目名称:laracast,代码行数:7,代码来源:UsersController.php

示例7: postAction

 public function postAction()
 {
     $requestType = $this->getRequest()->getParam('requestType');
     if ($params = $this->getRequest()->getParam('params')) {
         foreach ($params as $key => $value) {
             if (!$value) {
                 unset($params[$key]);
             }
         }
     } else {
         $params = array();
     }
     if ($options = $this->getRequest()->getParam('options')) {
         foreach ($options as $key => $value) {
             if (!$value) {
                 unset($options[$key]);
             }
         }
     } else {
         $options = array();
     }
     $time = microtime(true);
     Mage::register('vd', 1);
     $html = vd(Mage::helper('fitment/api')->request($requestType, $params, $options), true);
     $time = round(microtime(true) - $time, 3);
     $responseData = array('dump' => $html, 'time' => $time);
     echo json_encode($responseData);
     die;
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:29,代码来源:TestController.php

示例8: action_index

 public function action_index()
 {
     $entries = $this->size->find_all();
     vd($entries);
     $view = View::factory('admin/size-list');
     $view->bind('entries', $entries);
     $this->template->content = $view;
 }
开发者ID:korejwo,项目名称:tizzy,代码行数:8,代码来源:Size.php

示例9: action_status

 public function action_status()
 {
     $push = new PushConnection($this->config['gg']['number'], $this->config['gg']['login'], $this->config['gg']['password']);
     vd($push);
     $status = $push->setStatus('trwają testy, wkrótce zapraszam');
     vd($status);
     exit;
 }
开发者ID:korejwo,项目名称:michales,代码行数:8,代码来源:Index.php

示例10: action_players

 public function action_players()
 {
     $Player = new Model_Player();
     $players = $Player->find_all(0, 0, array(array("status", '=', 1)), array("role"));
     vd($players, 1);
     $view = View::factory('panel/war_list');
     $view->bind('wars', $wars);
     $this->template->content = $view;
 }
开发者ID:korejwo,项目名称:coc,代码行数:9,代码来源:Panel.php

示例11: action_save

 public function action_save()
 {
     $post = $this->request->post();
     if (count($post)) {
         vd($post);
         $Oceny = new Model_Oceny();
         $Oceny->add(array("points" => $post['points'], "steps" => json_encode($post['steps']), "created" => date("Y-m-d H:i:s")));
     }
     exit;
 }
开发者ID:korejwo,项目名称:michales,代码行数:10,代码来源:Index.php

示例12: __call

 public function __call($method, $arguments)
 {
     vd($method);
     $function = [$this->cursor, $method];
     $result = call_user_func_array($function, $arguments);
     if ($result instanceof \MongoCursor) {
         return $this;
     }
     return $result;
 }
开发者ID:schpill,项目名称:standalone,代码行数:10,代码来源:Arrays.php

示例13: actionIndex

 public function actionIndex()
 {
     $url = 'http://liverss.ru/';
     //$url = 'https://news.yandex.ru/world.html';
     //$url = 'https://news.yandex.ru/world.rss';
     $rss = file_get_contents($url);
     //$rss = simplexml_load_file($url);       //Интерпретирует XML-файл в объект
     vd($rss);
     return $this->render('index', ['rss' => $rss]);
 }
开发者ID:kotmonstr,项目名称:full-shop,代码行数:10,代码来源:DefaultController.php

示例14: vdob

function vdob(&$v, $replace_n = false)
{
    ob_start();
    vd($v);
    if ($replace_n) {
        return str_replace("\n", '<br />', ob_get_clean());
    } else {
        return ob_get_clean();
    }
}
开发者ID:laiello,项目名称:my-imouto-booru,代码行数:10,代码来源:debug.php

示例15: register

 public function register(Request $request)
 {
     vd($request);
     die;
     $filePath = '/img/avatar/' . uniqid() . $request->file['name'];
     move_uploaded_file($request->file['tmp_name'], app()->basepath . '/public/' . $filePath);
     $user = new User(['name' => $request->name, 'role' => $request->role, 'avatar' => $filePath]);
     vd($user);
     if ($user->save()) {
         echo 'Hallo ' . $request->name;
     } else {
         echo 'Da lief was schief';
     }
 }
开发者ID:whereo,项目名称:whereo,代码行数:14,代码来源:HomeController.php


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