EMC体育官网

数据库链接错误 : No such file or directory

87. * @ param dbConfig  数据库配置
88. */
89. public function __construct ( $dbConfig )
90. {
91. $linkfunction = ( TRUE == $dbConfig [ 'persistent' ] ) ? 'mysql_pconnect' : 'mysql_connect' ;
92. $this -> conn = $linkfunction ( $dbConfig [ 'host' ]. ":" . $dbConfig [ 'port' ], $dbConfig [ 'login' ], $dbConfig [ 'password' ]) or spError ( "数据库链接错误 : " . mysql_error ());
93. mysql_select_db ( $dbConfig [ 'database' ], $this -> conn ) or spError ( "无法找到数据库,请确认数据库名称正确!" );
94. $this -> exec ( "SET NAMES UTF8" );
95. }
96. /**
97. * 对特殊字符进行过滤
155. }
156. }
157. if( FALSE != $has_define ){
158. $argString = '' ; $comma = '' ;
159. if( null != $args )for ( $i = 0 ; $i < count ( $args ); $i ++) { $argString .= $comma . "\$args[ $i ]" ; $comma = ', ' ; }
160. eval( "\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name( $argString );" );
161. return $GLOBALS [ 'G_SP' ][ "inst_class" ][ $class_name ];
162. }
163. spError ( $class_name . "类定义不存在,请检查。" );
164. }
165.
47. {
48. if( null == $this -> tbl_name ) $this -> tbl_name = $GLOBALS [ 'G_SP' ][ 'db' ][ 'prefix' ] . $this -> table ;
49. if( '' == $GLOBALS [ 'G_SP' ][ 'db_driver_path' ] ){
50. $GLOBALS [ 'G_SP' ][ 'db_driver_path' ] = $GLOBALS [ 'G_SP' ][ 'sp_drivers_path' ]. '/' . $GLOBALS [ 'G_SP' ][ 'db' ][ 'driver' ]. '.php' ;
51. }
52. $this -> _db = spClass ( 'db_' . $GLOBALS [ 'G_SP' ][ 'db' ][ 'driver' ], array( 0 => $GLOBALS [ 'G_SP' ][ 'db' ]), $GLOBALS [ 'G_SP' ][ 'db_driver_path' ]);
53. }
54.
55. /**
56. * 从数据表中查找一条记录
57. *
155. }
156. }
157. if( FALSE != $has_define ){
158. $argString = '' ; $comma = '' ;
159. if( null != $args )for ( $i = 0 ; $i < count ( $args ); $i ++) { $argString .= $comma . "\$args[ $i ]" ; $comma = ', ' ; }
160. eval( "\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name( $argString );" );
161. return $GLOBALS [ 'G_SP' ][ "inst_class" ][ $class_name ];
162. }
163. spError ( $class_name . "类定义不存在,请检查。" );
164. }
165.
81. $__action = isset( $_REQUEST [ $GLOBALS [ 'G_SP' ][ "url_action" ]]) ?
82. $_REQUEST [ $GLOBALS [ 'G_SP' ][ "url_action" ]] :
83. $GLOBALS [ 'G_SP' ][ "default_action" ];
84.
85. // 自动执行用户代码
86. $conf = spClass ( 'm_conf' )-> find ();
87. define ( "RCMAPRQ" , $conf [ 'rcmaprq' ]);
88. define ( "YUEFEN" , $conf [ 'yuefen' ]);
89. if( RCMAPRQ <> date ( 'Y-m-d' )){
90. define ( "GENGXIN" , TRUE );
91. }else{
5. define ( 'APP_PATH' , dirname ( __FILE__ ));
6. define ( 'SP_PATH' , dirname ( __FILE__ ). '/Comm/MyFrame' );
7. //加载配置文件
8. require( 'config.php' );
9. //加载框架核心
10. require( SP_PATH . '/SpeedPHP.php' );
11. require( 'functions.php' );
12. //执行应用
13. spRun ();
EMC体育官网. ?>