本文整理汇总了PHP中vd函数的典型用法代码示例。如果您正苦于以下问题:PHP vd函数的具体用法?PHP vd怎么用?PHP vd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vd函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: generateWord
function generateWord($word)
{
if (!$this->isMatch($word)) {
return false;
}
if ($this->remove_len && mb_strlen($word) >= $this->remove_len) {
$tail = mb_substr($word, -$this->remove_len);
if ($tail != $this->remove) {
vd("Try to remove {$tail} from {$word}");
vd($this);
exit;
}
$word = mb_substr($word, 0, -$this->remove_len);
}
return "{$word}{$this->append}";
}
开发者ID:Garcy111,项目名称:Garcy-Framework-2,代码行数:16,代码来源:Suffix.php
示例17: update
/**
* Call after dispatcher is executed
*
* @param \Tk\FrontController $obs
* @throws \Tk\Exception
*/
public function update($obs)
{
tklog($this->getClassName() . '::update()');
if (!$this->getConfig()->isLti()) {
return;
}
if (preg_match('/^\\/lti\\/launch.html/', $this->getUri()->getPath(true))) {
$toolProvider = $this->getConfig()->getLtiToolProvider(array('connect' => array($this, 'doLaunch')));
$toolProvider->execute();
if ($this->reason) {
throw new \Tk\Exception($this->reason);
}
throw new \Tk\Exception('Access Error: Please check your `Key` and `Secret` values are correct.');
}
vd($this->getConfig()->getLtiSession());
}
开发者ID:kronius,项目名称:lti-base,代码行数:22,代码来源:LtiLaunch.php
示例18: 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);
$data = Mage::helper('arioem/api')->setApiMode('check')->request($requestType, $params, $options);
$time = round(microtime(true) - $time, 3);
if (isset($data['responseType']) && $data['responseType'] == 'image') {
$fileName = 'arioem-check-images/' . implode('-', $params) . '.gif';
$filePath = Mage::getModel('core/config')->getBaseDir('media') . '/' . $fileName;
$imageDirPath = dirname($filePath);
if (!file_exists($imageDirPath)) {
mkdir($imageDirPath, 0777, true);
}
if ($f = fopen($filePath, 'w')) {
fwrite($f, $data['image']);
fclose($f);
} else {
Mage::log("Cannot open file '{$filePath}' for writing");
}
$responseData = array('requestType' => $requestType, 'responseType' => 'image', 'time' => $time, 'imageURL' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . $fileName);
} else {
$responseData = array('requestType' => $requestType, 'responseType' => 'data', 'time' => $time, 'dump' => vd($data, true));
}
echo json_encode($responseData);
die;
}
开发者ID:rcclaudrey,项目名称:dev,代码行数:45,代码来源:CheckController.php
示例19: actionSuccesspay
public function actionSuccesspay()
{
// vd(['get' => Yii::$app->request->getQueryParams() ,
// 'post' => Yii::$app->request->getBodyParams()],1);
$r = new Request();
//Yii::info(\yii\helpers\Json::encode($requestData), 'apiRequest');
\Yii::info('[DEBUG_ME]' . print_r(['get' => $r->getQueryParams(), 'post' => $r->getBodyParams()], true), 'appDebug');
if ($r->post('action')) {
vd(['get' => $r->getQueryParams(), 'post' => $r->getBodyParams()], 1);
}
$order = Order::findOne($r->post('orderNumber'));
if ($order) {
} else {
vd($order);
}
$project = $order->project;
return $this->render('successpay', ['project' => $project]);
}
开发者ID:pjoger,项目名称:pon4ik,代码行数:18,代码来源:OrderController.php
示例20: send_email
/**
* 发送邮件方法
*
* 发送邮件给用户,全站公用方法
*
* @author NJ <[email protected]>
* @ctime 2016年03月19日11:58:47
* @return mixed 发送是否成功,不成功的话,则返回错误信息,上线后需要屏蔽
*
*/
public function send_email($email_address = '[email protected]', $subject = '系统邮件', $content = '测试邮件')
{
$this->load->library('email');
// $this->email->initialize($config);
$this->email->from('[email protected]', 'NingerJohn');
$this->email->to($email_address);
// $this->email->cc('[email protected]');
// $this->email->bcc('[email protected]');
$this->email->subject($subject);
$this->email->message($content);
$result = $this->email->send();
if ($result) {
// vd($result);
return true;
} else {
vd($this->email->print_debugger());
return $this->email->print_debugger();
}
}
开发者ID:NingerJohn,项目名称:learn-ci-egcode,代码行数:29,代码来源:MY_Controller.php
注:本文中的vd函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论