本文整理汇总了PHP中debug::vars方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::vars方法的具体用法?PHP debug::vars怎么用?PHP debug::vars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug
的用法示例。
在下文中一共展示了debug::vars方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
echo debug::vars($header, $doc);
示例2: team_link_from_id
<?debug::vars($current_game) ?>
<table>
<form action="" method="POST">
<tr>
<th align="center" style="font-size:24px;"><?php
echo team_link_from_id($current_game['team1']);
?>
</th>
<th align="center" style="font-size:24px;"><?php
echo team_link_from_id($current_game['team2']);
?>
</th>
</tr>
<tr>
<td align="center"><input type="text" name="score1" size="1" style="height:50px;font-size:38px;text-align:center;"></td>
<td align="center"><input type="text" name="score2" size="1" style="height:50px;font-size:38px;text-align:center;"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Report Results" style="height:50px;font-size:18px;">
</td>
</tr>
</form>
</table>
示例3: action_checkout
public function action_checkout()
{
$this->template->content = View::factory('site/orders/checkout');
if (isset($_POST['checkout']) && $_POST['total_price'] != "") {
$order = ORM::factory('order');
//$order->user_id=$_SESSION['auth_user_munch']->id; //NEED TO HANDLE USER ID IN SESSION
$order->totalprice = $_POST['total_price'];
echo debug::vars($order);
$order->save();
foreach ($_SESSION['cart_array'] as $key => $dish) {
$ordersdish = ORM::factory('ordersdish');
$ordersdish->order_id = $order->id;
$ordersdish->dish_id = $dish['dish_id'];
$ordersdish->restaurant_id = $dish['rest_id'];
$ordersdish->quantity = $dish['quantity'];
$ordersdish->price = $dish['price'];
$ordersdish->price = $dish['comments'];
$ordersdish->save();
if (isset($dish['ingredients']) && $dish['ingredients'] != NULL) {
foreach ($dish['ingredients'] as $key => $ingredient) {
$ordersdishesingredient = orm::factory('ordersdishesingredient');
$ordersdishesingredient->orders_dishes_id = $ordersdish->id;
$ordersdishesingredient->ingredient_id = $ingredient['ingredient_id'];
$ordersdishesingredient->price = $ingredient['price'];
$ordersdishesingredient->save();
}
}
if (isset($dish['subs']) && $dish['subs'] != NULL) {
foreach ($dish['subs'] as $key => $sub) {
$ordersdishesgroupssub = orm::factory('ordersdishesgroupssub');
$ordersdishesgroupssub->orders_dishes_id = $ordersdish->id;
$ordersdishesgroupssub->group_id = $sub['group_id'];
$ordersdishesgroupssub->sub_id = $sub['sub_id'];
$ordersdishesgroupssub->price = $sub['price'];
$ordersdishesgroupssub->save();
}
}
}
session_unset();
}
}
示例4:
<?php
if (!empty($header)) {
?>
<h3><?php
echo $header;
?>
</h3>
<?php
}
?>
<?php
echo debug::vars($params);
示例5: after
public function after()
{
if ($this->param('debug') !== NULL) {
$this->response->body(debug::vars($this->json));
return;
}
if (is_array($this->json)) {
$this->request->headers('Content-type', 'application/json');
if (!isset($this->json['response'])) {
$this->json['response'] = NULL;
}
$this->json = json_encode($this->json);
}
$this->response->body($this->json);
}
示例6: debug
/**
*
* @return \API_Response
*/
public function debug()
{
echo debug::vars($this->body());
return $this;
}
示例7: _dpx_files_content
protected function _dpx_files_content($response)
{
if (!$response) {
return FALSE;
}
//Each file and folder
foreach ($response->contents as $file) {
// Update folder otherwise update file
if ($file->is_dir) {
$dir_path = $this->_content_path . $file->path;
if (isset($file->is_deleted)) {
echo debug::vars("Remove folder : {$dir_path}");
$this->_rrmdir($dir_path);
} else {
if (!is_dir($dir_path)) {
echo debug::vars("Create folder : {$dir_path}");
mkdir($dir_path);
}
}
// echo debug::vars($file);
// New iteration
$this->_dpx_files_content($this->_dpx_files_metadata($file->path));
} else {
$file_content = Request::factory('https://content.dropboxapi.com/1/files/auto/')->headers('Authorization', 'Bearer ' . $this->_access_token)->headers('Content-Type', 'application/json')->query('path', $file->path)->execute()->body();
$file_path = $this->_content_path . $file->path;
// revision hash based on path + revision
$dpx_hash_file = $this->_content_path . '/_dpx_changes/' . md5($file->path . $file->revision);
if (file_exists($dpx_hash_file)) {
echo debug::vars("No change for : {$file_path}");
continue;
}
echo debug::vars("Create / update file : {$file_path}");
// echo debug::vars($file);
touch($dpx_hash_file);
if (isset($file->is_deleted)) {
if (is_file($file_path)) {
unlink($file_path);
}
} else {
file_put_contents($file_path, $file_content, LOCK_EX);
}
}
}
}