MODPATH/database/classes/kohana/database/mysql.php [ 108 ]
103 protected function _select_db($database)
104 {
105 if ( ! mysql_select_db($database, $this->_connection))
106 {
107 // Unable to select database
108 throw new Database_Exception(':error',
109 array(':error' => mysql_error($this->_connection)),
110 mysql_errno($this->_connection));
111 }
112
113 Database_MySQL::$_current_databases[$this->_connection_id] = $database;
-
MODPATH/database/classes/kohana/database/mysql.php [ 75 ] » Kohana_Database_MySQL->_select_db(arguments)
0
string(16) "www_stourweb_com"
70 } 71 72 // \xFF is a better delimiter, but the PHP driver uses underscore 73 $this->_connection_id = sha1($hostname.'_'.$username.'_'.$password); 74 75 $this->_select_db($database); 76 77 if ( ! empty($this->_config['charset'])) 78 { 79 // Set the character set 80 $this->set_charset($this->_config['charset']);
-
MODPATH/database/classes/kohana/database/mysql.php [ 431 ] » Kohana_Database_MySQL->connect()
426 } 427 428 public function escape($value) 429 { 430 // Make sure the database is connected 431 $this->_connection or $this->connect(); 432 433 if (($value = mysql_real_escape_string( (string) $value, $this->_connection)) === FALSE) 434 { 435 throw new Database_Exception(':error', 436 array(':error' => mysql_error($this->_connection)),
-
MODPATH/database/classes/kohana/database.php [ 478 ] » Kohana_Database_MySQL->escape(arguments)
0
string(1) "1"
473 { 474 // Convert to non-locale aware float to prevent possible commas 475 return sprintf('%F', $value); 476 } 477 478 return $this->escape($value); 479 } 480 481 /** 482 * Quote a database column name and add the table prefix if needed. 483 *
-
MODPATH/database/classes/kohana/database/query/builder.php [ 120 ] » Kohana_Database->quote(arguments)
0
string(1) "1"
115 $value = $min.' AND '.$max; 116 } 117 elseif ((is_string($value) AND array_key_exists($value, $this->_parameters)) === FALSE) 118 { 119 // Quote the value, it is not a parameter 120 $value = $db->quote($value); 121 } 122 123 if ($column) 124 { 125 if (is_array($column))
-
MODPATH/database/classes/kohana/database/query/builder/select.php [ 372 ] » Kohana_Database_Query_Builder->_compile_conditions(arguments)
0
object Database_MySQL(6)
{ protected _connection_id => string(40) "5a8474e607ff301101c48d882bd1a01189de59c3" protected _identifier => string(1) "`" public last_query => NULL protected _instance => string(7) "default" protected _connection => bool FALSE protected _config => array(6) ( "type" => string(5) "mysql" "connection" => array(3) ( "hostname" => string(9) "127.0.0.1" "database" => string(16) "www_stourweb_com" "persistent" => bool FALSE ) "table_prefix" => string(5) "help_" "charset" => string(4) "utf8" "caching" => bool FALSE "profiling" => bool TRUE ) }
1
array(1) ( 0 => array(1) ( "AND" => array(3) ( 0 => string(2) "id" 1 => string(1) "=" 2 => string(1) "1" ) ) )
367 } 368 369 if ( ! empty($this->_where)) 370 { 371 // Add selection conditions 372 $query .= ' WHERE '.$this->_compile_conditions($db, $this->_where); 373 } 374 375 if ( ! empty($this->_group_by)) 376 { 377 // Add grouping
-
MODPATH/database/classes/kohana/database/query.php [ 234 ] » Kohana_Database_Query_Builder_Select->compile(arguments)
0
object Database_MySQL(6)
{ protected _connection_id => string(40) "5a8474e607ff301101c48d882bd1a01189de59c3" protected _identifier => string(1) "`" public last_query => NULL protected _instance => string(7) "default" protected _connection => bool FALSE protected _config => array(6) ( "type" => string(5) "mysql" "connection" => array(3) ( "hostname" => string(9) "127.0.0.1" "database" => string(16) "www_stourweb_com" "persistent" => bool FALSE ) "table_prefix" => string(5) "help_" "charset" => string(4) "utf8" "caching" => bool FALSE "profiling" => bool TRUE ) }
229 { 230 $object_params = $this->_object_params; 231 } 232 233 // Compile the SQL query 234 $sql = $this->compile($db); 235 236 if ($this->_lifetime !== NULL AND $this->_type === Database::SELECT) 237 { 238 // Set the cache key based on the database instance name and SQL 239 $cache_key = 'Database::query("'.$db.'", "'.$sql.'")';
-
APPPATH/classes/stourweb/controller.php [ 30 ] » Kohana_Database_Query->execute()
25 $this->assign('cmsurl', URL::site()); //相对地址 26 $this->assign('weburl', $GLOBALS['cfg_basehost']);//当前域名 27 $this->assign('publicurl',$GLOBALS['cfg_public_url']);//公共资源css,images地址 28 $this->assign('webname','思途旅游CMS'); 29 //统计代码 30 $code_data = DB::select_array(array('code'))->from('code')->where('id', '=', '1')->execute()->current(); 31 $this->assign('code_data', $code_data); 32 33 //4.判断是否登录 34 $session = Session::instance(); 35
-
APPPATH/classes/controller/updatepatch.php [ 13 ] » Stourweb_Controller->before()
8 */ 9 class Controller_UpdatePatch extends Stourweb_Controller 10 { 11 public function before() 12 { 13 parent::before(); 14 } 15 16 /** 17 * 首页 18 */
-
{PHP internal call} » Controller_UpdatePatch->before()
-
SYSPATH/classes/kohana/request/client/internal.php [ 108 ] » ReflectionMethod->invoke(arguments)
0
object Controller_UpdatePatch(5)
{ public _data => array(4) ( "cmsurl" => string(5) "/cms/" "weburl" => string(23) "http://www.stourweb.com" "publicurl" => string(12) "/cms/public/" "webname" => string(15) "思途旅游CMS" ) public params => array(1) ( "" => integer 0 ) public memberID => integer 0 public request => object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/2.0" protected _secure => bool TRUE protected _referrer => NULL protected _route => object Route(5)
public response => object Response(5){ protected _callback => NULL protected _uri => string(17) "version/id_(<id>)" protected _regex => array(1) ( "id" => string(3) "\d+" ) protected _defaults => array(2) ( "controller" => string(11) "updatepatch" "action" => string(12) "patch_detail" ) protected _route_regex => string(33) "#^version/id_(?:(?P<id>\d+))?$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/2.0" }{ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(11) "updatepatch" protected _action => string(12) "patch_detail" protected _uri => string(15) "version/id_7448" protected _external => bool FALSE protected _params => array(1) ( "id" => string(4) "7448" ) protected _get => array(0) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}{ protected _status => integer 200 protected _header => object HTTP_Header(0)
}{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/2.0" }103 } 104 105 // Create a new instance of the controller 106 $controller = $class->newInstance($request, $request->response() ? $request->response() : $request->create_response()); 107 108 $class->getMethod('before')->invoke($controller); 109 110 // Determine the action to use 111 $action = $request->action(); 112 113 // If the action doesn't exist, it's a 404
-
SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)
0
object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/2.0" protected _secure => bool TRUE protected _referrer => NULL protected _route => object Route(5)
{ protected _callback => NULL protected _uri => string(17) "version/id_(<id>)" protected _regex => array(1) ( "id" => string(3) "\d+" ) protected _defaults => array(2) ( "controller" => string(11) "updatepatch" "action" => string(12) "patch_detail" ) protected _route_regex => string(33) "#^version/id_(?:(?P<id>\d+))?$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/2.0" }{ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(11) "updatepatch" protected _action => string(12) "patch_detail" protected _uri => string(15) "version/id_7448" protected _external => bool FALSE protected _params => array(1) ( "id" => string(4) "7448" ) protected _get => array(0) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}59 public function execute(Request $request) 60 { 61 if ($this->_cache instanceof HTTP_Cache) 62 return $this->_cache->execute($this, $request); 63 64 return $this->execute_request($request); 65 } 66 67 /** 68 * Processes the request passed to it and returns the response from 69 * the URI resource identified.
-
SYSPATH/classes/kohana/request.php [ 1163 ] » Kohana_Request_Client->execute(arguments)
0
object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/2.0" protected _secure => bool TRUE protected _referrer => NULL protected _route => object Route(5)
{ protected _callback => NULL protected _uri => string(17) "version/id_(<id>)" protected _regex => array(1) ( "id" => string(3) "\d+" ) protected _defaults => array(2) ( "controller" => string(11) "updatepatch" "action" => string(12) "patch_detail" ) protected _route_regex => string(33) "#^version/id_(?:(?P<id>\d+))?$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/2.0" }{ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(11) "updatepatch" protected _action => string(12) "patch_detail" protected _uri => string(15) "version/id_7448" protected _external => bool FALSE protected _params => array(1) ( "id" => string(4) "7448" ) protected _get => array(0) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}1158 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array( 1159 ':uri' => $this->_uri, 1160 )); 1161 } 1162 1163 return $this->_client->execute($this); 1164 } 1165 1166 /** 1167 * Returns whether this request is the initial request Kohana received. 1168 * Can be used to test for sub requests.
-
DOCROOT/index.php [ 119 ] » Kohana_Request->execute()
114 /** 115 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 116 * If no source is specified, the URI will be automatically detected. 117 */ 118 echo Request::factory() 119 ->execute() 120 ->send_headers(TRUE) 121 ->body(); 122 123 }