NOTICE: Undefined index: MYSQL_DB in /data1/www/htdocs/569/speedphp/1/protected/lib/speed.php on line 329
- /data1/www/htdocs/569/speedphp/1/protected/lib/speed.php on line 495
490.
$msg = "ERROR";
491.
if($errno == E_WARNING)$msg = "WARNING";
492.
if($errno == E_NOTICE)$msg = "NOTICE";
493.
if($errno == E_STRICT)$msg = "STRICT";
494.
if($errno == 8192)$msg = "DEPRECATED";
495.
496.
err("$msg: $errstr in $errfile on line $errline");
}
497.
function err($msg){
498.
$msg = htmlspecialchars($msg);
499.
$traces = debug_backtrace();
500.
if(!$GLOBALS['debug']){
- /data1/www/htdocs/569/speedphp/1/protected/lib/speed.php on line 329
324.
}
325.
326.
public function dbInstance($db_config, $db_config_key, $force_replace = false){
327.
if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
328.
try {
329.
330.
$GLOBALS['mysql_instances'][$db_config_key] = new PDO('mysql:dbname='.$db_config['MYSQL_DB'].';host='.$db_config['MYSQL_HOST'].';port='.$db_config['MYSQL_PORT'], $db_config['MYSQL_USER'], $db_config['MYSQL_PASS'], array(PDO::MYSQL_ATTR_INIT_COMMAND=>'SET NAMES \''.$db_config['MYSQL_CHARSET'].'\''));
}catch(PDOException $e){err('Database Err: '.$e->getMessage());}
331.
}
332.
return $GLOBALS['mysql_instances'][$db_config_key];
333.
}
334.
- /data1/www/htdocs/569/speedphp/1/protected/lib/speed.php on line 303
298.
299.
if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
300.
$slave_key = array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
301.
$sth = $this->dbInstance($GLOBALS['mysql']['MYSQL_SLAVE'][$slave_key], 'slave_'.$slave_key)->prepare($sql);
302.
}else{
303.
304.
$sth = $this->dbInstance($GLOBALS['mysql'], 'master')->prepare($sql);
}
305.
306.
if(is_array($params) && !empty($params)){
307.
foreach($params as $k => &$v){
308.
if(is_int($v)){
- /data1/www/htdocs/569/speedphp/1/protected/lib/speed.php on line 242
237.
}
238.
public function decr($conditions, $field, $optval = 1){return $this->incr($conditions, $field, - $optval);}
239.
240.
public function delete($conditions){
241.
$conditions = $this->_where( $conditions );
242.
243.
return $this->execute("DELETE FROM ".$this->table_name.$conditions["_where"], $conditions["_bindParams"]);
}
244.
245.
public function create($row){
246.
$values = array();
247.
foreach($row as $k=>$v){
- /data1/www/htdocs/569/speedphp/1/protected/controller/DbController.php on line 43
38.
// 删除uid为3的行
39.
$uid = 3;
40.
// 与insert,update等类似,delete也是输入条件数组
41.
$this->result = $user->delete(array(
42.
"uid" => $uid
43.
44.
));
// delete也是返回影响行数,没有匹配的结果会返回0
45.
46.
$this->findall = $user->findAll();
47.
$this->display("db/delete.html");
48.
}
- /data1/www/htdocs/569/speedphp/1/protected/lib/speed.php on line 80
75.
if(!is_available_classname($__controller))_err_router("Err: Controller '$controller_name' is not correct!");
76.
if(!class_exists($controller_name, true))_err_router("Err: Controller '$controller_name' is not exists!");
77.
if(!method_exists($controller_name, $action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
78.
79.
$controller_obj = new $controller_name();
80.
81.
$controller_obj->$action_name();
82.
if($controller_obj->_auto_display){
83.
$auto_tpl_name = (empty($__module) ? '' : $__module.DS).$__controller.'_'.$__action.'.html';
84.
if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
85.
}
- /data1/www/htdocs/569/speedphp/1/index.php on line 3
1.
<?php
2.
define('APP_DIR', realpath('./'));
3.
require(APP_DIR.'/protected/lib/speed.php');