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


PHP bug函数代码示例

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


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

示例1: ajax

 function ajax()
 {
     $dir = $this->input->post('dir');
     $fieldKey = 'fileajax';
     if (!isset($_FILES[$fieldKey]['tmp_name']) || !$_FILES[$fieldKey]['tmp_name']) {
         return false;
     }
     if (!$dir) {
         $dir = 'uploads';
     }
     $this->load->helper('file');
     $dir_full = $this->config->item('resouce_dir') . $dir;
     if (is_dir($dir_full)) {
         $config['upload_path'] = $dir_full;
     } else {
         $config['upload_path'] = BASEPATH . '../files/' . $dir;
     }
     $config['allowed_types'] = 'gif|jpg|png';
     $this->load->library('upload', $config);
     if (!$this->upload->do_upload($fieldKey)) {
         bug($this->upload->error_msg);
         die('can not upload');
     } else {
         $newFile = array('name' => $this->upload->file_name, 'size' => $this->upload->file_size);
         echo json_encode(array('f' => $this->config->item('resouce_url') . $dir . $this->upload->file_name));
     }
     return NULL;
 }
开发者ID:quanict,项目名称:annu,代码行数:28,代码来源:Upload.php

示例2: get_laporan_datatable

 /**
  * Get Laporan Dari Datatable
  */
 public function get_laporan_datatable()
 {
     $lokasi = decode($this->uri->segment(3));
     $tahun = decode($this->uri->segment(4));
     $this->load->model('laporan');
     $data = $this->laporan->data_pegawai_datatable($lokasi, $tahun);
     bug($data);
 }
开发者ID:philtyphil,项目名称:realisasi,代码行数:11,代码来源:laporan.php

示例3: update

 function update($data)
 {
     $data = $this->Common_Model->alias_check($data, 'title');
     $existed = false;
     foreach ($data['alias'] as $alias) {
         if (!$existed && $alias && $this->item_existed($data['id'], $alias)) {
             $existed = true;
         }
     }
     if ($existed) {
         bug($existed);
         die('exited');
         return $data;
     }
     if (!$data['img']) {
         unset($data['img']);
     }
     $this->Common_Model->update(0, 'articles', $data, $this->fields_lang);
     return true;
 }
开发者ID:quanict,项目名称:annu,代码行数:20,代码来源:Articles_model.php

示例4: ajax

 private function ajax($limitF = 0, $limitTo = 5, $order = '', $where = '', $table, $select = '*', $returnTableAjax = TRUE)
 {
     $dataReturn = array('totalRecords' => 0, 'data' => null);
     $limitTo = $limitTo ? $limitTo : 10;
     if (is_array($where)) {
         foreach ($where as $key => $item) {
             $this->where[$key] = $item;
         }
     }
     if ($order != '') {
         $this->order = $order;
     }
     //		$this->order = ($order !='' )?$order:$orderDefault;
     $dataReturn['totalRecords'] = $this->pak->from($table)->where($this->where)->count_all_results();
     if ($dataReturn['totalRecords'] <= $limitF) {
         $limitF = 0;
     }
     $query = $this->pak->select($select)->from($table)->where($this->where)->order_by($this->order)->limit($limitTo, $limitF)->get();
     if (!$query) {
         bug($this->pak->last_query());
         exit('error database');
     }
     $data = $query->result_array();
     if ($data) {
         if ($returnTableAjax === TRUE) {
             foreach ($data as $key => $v) {
                 $row = array_values($v);
                 $row[] = null;
                 $dataReturn['data'][] = $row;
             }
         } else {
             $dataReturn['data'] = $data;
         }
     }
     return $dataReturn;
 }
开发者ID:quanict,项目名称:parkornleather,代码行数:36,代码来源:pak_model.php

示例5: bug

<?php

$PHP_SELF = $_SERVER["PHP_SELF"];
bug($_POST, "POST");
?>
<h1>TODOS LOS CONTROLES</h1>
EN CASO DE ENVIO DE FICHEROS: enctype="multipart/form-data"
<form id="frmTest" name="frmTest" method="post" action="<?php 
echo $PHP_SELF;
?>
" enctype="" >
    <table id="tblTest" style="border: 1px solid #5C9425; width: 70%" >
       <tr>
            <td style="border: 1px solid #5C9425" >
                <label for="botBoton" >botBoton </label>
                <input type="button" id="botBoton" name="botBoton" value="botBoton" onclick="" />
            </td>
        </tr>
         
        <tr style="border: 1px solid #5C9425" >
            <td style="border: 1px solid #5C9425" >
                <label for="txtText" >TxtTest</label>
                <input type="text" id="txtTest" name="txtTest" value="value txttest" />
            </td>
        </tr>
        <tr style="border: 1px solid #5C9425" >
            <td style="border: 1px solid #5C9425" >
                <label for="passTest" >passTest</label>
                <input type="password" id="passTest" name="passTest" value="value passTest" />
            </td>
        </tr>        
开发者ID:eacevedof,项目名称:prj_anytest,代码行数:31,代码来源:html5_todos_los_controles.php

示例6: show_error

/**
 * Initialize the database
 *
 * @category Database
 * @author ExpressionEngine Dev Team
 * @link http://codeigniter.com/user_guide/database/
 * @param
 *        	string
 * @param
 *        	bool	Determines if active record should be used or not
 */
function &DB($params = '', $active_record_override = NULL)
{
    if (!$params) {
        $params = 'default';
    }
    // Load the DB config file if a DSN string wasn't passed
    if (is_string($params) and strpos($params, '://') === FALSE) {
        include BASEPATH . 'config/database.php';
        // Is the config file in the environment folder?
        if (!defined('ENVIRONMENT') or !file_exists($file_path = APPPATH . 'config/' . ENVIRONMENT . '/database.php')) {
            if (file_exists($file_path = APPPATH . 'config/database.php')) {
                // show_error('The configuration file database.php does not exist.');
                include $file_path;
            }
        }
        if (!isset($db) or count($db) == 0) {
            show_error('No database connection settings were found in the database config file.');
        }
        if ($params != '') {
            $active_group = $params;
        }
        if (!isset($active_group) or !isset($db[$active_group])) {
            bug($active_group);
            die('no $active_group');
            show_error('You have specified an invalid database connection group.');
        }
        $params = $db[$active_group];
    } elseif (is_string($params)) {
        /*
         * parse the URL from the DSN string
         * Database settings can be passed as discreet
         * parameters or as a data source name in the first
         * parameter. DSNs must have this prototype:
         * $dsn = 'driver://username:password@hostname/database';
         */
        if (($dns = @parse_url($params)) === FALSE) {
            show_error('Invalid DB Connection String');
        }
        $params = array('dbdriver' => $dns['scheme'], 'hostname' => isset($dns['host']) ? rawurldecode($dns['host']) : '', 'username' => isset($dns['user']) ? rawurldecode($dns['user']) : '', 'password' => isset($dns['pass']) ? rawurldecode($dns['pass']) : '', 'database' => isset($dns['path']) ? rawurldecode(substr($dns['path'], 1)) : '');
        // were additional config items set?
        if (isset($dns['query'])) {
            parse_str($dns['query'], $extra);
            foreach ($extra as $key => $val) {
                // booleans please
                if (strtoupper($val) == "TRUE") {
                    $val = TRUE;
                } elseif (strtoupper($val) == "FALSE") {
                    $val = FALSE;
                }
                $params[$key] = $val;
            }
        }
    }
    // No DB specified yet? Beat them senseless...
    if (!isset($params['dbdriver']) or $params['dbdriver'] == '') {
        show_error('You have not selected a database type to connect to.');
    }
    // Load the DB classes. Note: Since the active record class is optional
    // we need to dynamically create a class that extends proper parent class
    // based on whether we're using the active record class or not.
    // Kudos to Paul for discovering this clever use of eval()
    if ($active_record_override !== NULL) {
        $active_record = $active_record_override;
    }
    require_once BASEPATH . 'database/DB_driver.php';
    if (!isset($active_record) or $active_record == TRUE) {
        require_once BASEPATH . 'database/DB_active_rec.php';
        if (!class_exists('CI_DB')) {
            eval('class CI_DB extends CI_DB_active_record { }');
        }
    } else {
        if (!class_exists('CI_DB')) {
            eval('class CI_DB extends CI_DB_driver { }');
        }
    }
    require_once BASEPATH . 'database/drivers/' . $params['dbdriver'] . '/' . $params['dbdriver'] . '_driver.php';
    // Instantiate the DB adapter
    $driver = 'CI_DB_' . $params['dbdriver'] . '_driver';
    $DB = new $driver($params);
    if ($DB->autoinit == TRUE) {
        $DB->initialize();
    }
    if (isset($params['stricton']) && $params['stricton'] == TRUE) {
        $DB->query('SET SESSION sql_mode="STRICT_ALL_TABLES"');
    }
    return $DB;
}
开发者ID:quanict,项目名称:giaF,代码行数:98,代码来源:DB.php

示例7: instruction

 function instruction()
 {
     bug("This should not happen.");
 }
开发者ID:rgigger,项目名称:zinc,代码行数:4,代码来源:lime.php

示例8: CGMap

<?php

Tfw::IMPORT(FOL_PHP_CLASSES, "CGmap");
$oGmap = new CGMap("España", "Madrid", "Carretera de Villaverde a vallecas 46", "28021", "Villaverde bajo");
bug($oGmap->get_xml_status(), "status");
bug($oGmap->get_latitud(), "Latitud");
bug($oGmap->get_longitud(), "Longitud");
bug($oGmap->get_xml_object_responsed(), "object xml");
开发者ID:eacevedof,项目名称:prj_anytest,代码行数:8,代码来源:gmap_peticion_xml.php

示例9: bug

//Configuramos el zoom
$oGoogleMap->set_zoom(7);
//Dibujamos las lineas entre los marcadores (pines)
//$oGoogleMap->draw_lines();
//Tamaño del mapa
$oGoogleMap->set_size_container(500, 500);
$oGoogleMap->set_size_unit('pt');
$oGoogleMap->draw_routes();
$oGoogleMap->set_route_color("black");
$oGoogleMap->set_marker_color("green");
$oGoogleMap->set_route_width(2);
//No se mostrarán numeros en los pines de googlemaps
//$oGoogleMap->set_markers_numbers_off();
//Calcula la distancia entre las chinchetas
$fDistancia = $oGoogleMap->sum_distance();
bug($fDistancia, "DISTANCIA");
//muestra 11.1
//$oGoogleMap->draw_map();
?>

<html>
    <head>
    <title>Goglemaps API 3 Clase PHP</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta charset="UTF-8">
    <script type="text/javascript" src="html_js/js_google/js_google_maps_3.js"></script>
    </head>
<body>
<!--<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=<?php 
echo TFW_GOOGLEAPIKEY;
?>
开发者ID:eacevedof,项目名称:prj_anytest,代码行数:31,代码来源:gmap_map_rutas.php

示例10: phpinfo

<dd>Added version info to handlers which show in phpinfo() output.</dd>
<dd>GDB: Fixed bug with continuing after breakpoint where only 'cont'
worked.</dd>
<dd>GDB: Fixed bug in deleting absolute breakpoints on Windows.</dd>
<dd>Fixed <?php 
bug(27);
?>
: Repeated connect attempts when no debugger is
listening.</dd>
<dd>Fixed <?php 
bug(19);
?>
: The value of xdebug.output_dir in a .htaccess
never takes effect.</dd>
<dd>Fixed <?php 
bug(18);
?>
: Mistyped sizeof()'s for array indexes in profiler
output.</dd>
<dd>Fixed handling stack traces for when display_errors was set to Off.</dd>
<dd>Fixed segfault where a function name didn't exist in case of a
"call_user_function".</dd>
<dd>Fixed reading a filename in case of an callback to a PHP function from an
internal function (like "array_map()").</dd>

<dt>[2003-09-18]</dt>
<dd>Fixed bug with wrong file names for functions called from call_user_*().</dd>

<dt>[2003-08-30]</dt>
<dd>Added the option "dump_superglobals" to the remote debugger. If you set
this option to 0 the "show-local" and similar commands will not return any data
开发者ID:GeeH,项目名称:xdebug.org,代码行数:31,代码来源:updates.php

示例11: instruction

 public function instruction()
 {
     bug('This should not happen.');
 }
开发者ID:rvanvelzen,项目名称:lime,代码行数:4,代码来源:lime.php

示例12: bugcond

function bugcond($var, $isCheckCondition)
{
    //var_dump($isCheckCondition);
    if ($isCheckCondition) {
        bug($var);
    } else {
        pr("isCheckCondition = FALSE");
    }
}
开发者ID:eacevedof,项目名称:prj_php_symfony,代码行数:9,代码来源:functions_debug.php

示例13: bug

<?php

function bug($flag)
{
    $tag = '';
    if ($flag) {
        $tag .= 'x';
    }
    $tag = '33';
    if ($flag) {
    } else {
        var_dump($tag);
    }
}
bug(false);
开发者ID:badlamer,项目名称:hhvm,代码行数:15,代码来源:1745.php

示例14: read_clobsss

 private function read_clobsss($field)
 {
     bug($field->load());
 }
开发者ID:philtyphil,项目名称:realisasi,代码行数:4,代码来源:frame_model.php

示例15: WhatsProt

$imei = "84:85:06:46:f3:c3";
// MAC Address for iOS IMEI for other platform (Android/etc)
$countrycode = "34";
$phonenumber = "626963672";
$wa = new WhatsProt($sender, $imei, $nickname, true);
$url = "https://r.whatsapp.net/v1/exist.php?cc=" . $countrycode . "&in=" . $phonenumber . "&udid=" . $wa->encryptPassword();
bug($url, "url");
$content = file_get_contents($url);
if (stristr($content, 'status="ok"') === false) {
    echo "Wrong Password\n";
    //exit(0);
}
$wa->Connect();
$wa->Login();
//bug($$wa);
bug($_SERVER, "SERVER");
/*
die;
bug($_SERVER,"SERVER");
$countrycode = substr($sender, 0, 2);
$phonenumber=substr($sender, 2);

if ($argc < 2) 
{
    echo "USAGE: ".$_SERVER["argv"][0]." [-l] [-s <phone> <message>] [-i <phone>]\n<br>";
    echo "\tphone: full number including country code, without '+' or '00'\n<br>";
    echo "\t-s: send message\n<br>";
    echo "\t-l: listen for new messages\n<br>";
    echo "\t-i: interactive conversation with <phone>\n<br>";
    exit(1);
}
开发者ID:eacevedof,项目名称:prj_anytest,代码行数:31,代码来源:whatsapp.php


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