数据库链接错误/无法找到数据库 : malformed database schema - unable to open a temporary database file for storing temporary tables

160.       */
161.      public function __construct($dbConfig)
162.      {
163.              if(!function_exists('sqlite_open'))spError('PHP环境未安装Sqlite函数库!');
164.              $linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'sqlite_popen' 'sqlite_open';
165.              if (! $this->conn $linkfunction($dbConfig['host'], 0666$sqliteerror))JError('数据库链接错误/无法找到数据库 : '$sqliteerror);
166.      }
167.      
168.      /**
169.       对特殊字符进行过滤
170.       *
202.                  $argString .= $comma "\$args[$i]"$comma ', '
203.              }
204.          }
205.          
206.          if($registerGlobal) {
207.              eval("\$GLOBALS['G_JCONFIG']['class_instances'][\$className]= new \$className($argString);"); 
208.              return $GLOBALS['G_JCONFIG']["class_instances"][$className];
209.          }
210.          else {
211.              return new $className($argString);
212.          }
51.      {
52.          if( null == $this->tbl_name )$this->tbl_name $GLOBALS['G_JCONFIG']['db']['prefix'] . $this->table;
53.          if( '' == $GLOBALS['G_JCONFIG']['db_driver_path'] ){
54.              $GLOBALS['G_JCONFIG']['db_driver_path'] = $GLOBALS['G_JCONFIG']['drivers_dir'].'/'.$GLOBALS['G_JCONFIG']['db']['driver'].'.php';
55.          }
56.          $this->_db JLoadClass('db_'.$GLOBALS['G_JCONFIG']['db']['driver'], array(0=>$GLOBALS['G_JCONFIG']['db']), $GLOBALS['G_JCONFIG']['db_driver_path']);
57.      }
58. 
59.      /**
60.       开始事务
61.       */
202.                  $argString .= $comma "\$args[$i]"$comma ', '
203.              }
204.          }
205.          
206.          if($registerGlobal) {
207.              eval("\$GLOBALS['G_JCONFIG']['class_instances'][\$className]= new \$className($argString);"); 
208.              return $GLOBALS['G_JCONFIG']["class_instances"][$className];
209.          }
210.          else {
211.              return new $className($argString);
212.          }
207.          }
208.          else {
209.              $cond1['category_code'] = $category_id;
210.          }
211. 
212.          $categories JLoadClass('categories');
213.          if($category_id) {
214.              if($category $categories->getOne($cond1)) {
215.                  $category_path $category['category_path'];
216.                  $parent_id $category['parent_id'];
217.                  $category_id $category['category_id'];
48.                      if($module_handle->template_name) {
49.                          $temp_template_name $module_handle->template_name;
50.                          unset($module_handle->template_name);
51.                      }
52.                      if(method_exists($module_handle$actionFunc)){
53.                          $module_handle->$actionFunc($params);                        
54.                          if(FALSE != $GLOBALS['G_JCONFIG']['view']['auto_display']){
55.                              if(isset($module_handle->template_name)) {
56.                                  if($module_handle->template_name != '') {
57.                                      $tpl $module.$GLOBALS['G_JCONFIG']['view']['auto_display_sep'].
58.                                          $module_handle->template_name.$GLOBALS['G_JCONFIG']['view']['template_file_suffix']; // 拼装模板路径    
88.                  <class="home" onclick="setMyHome()" href="#">设为主页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<class="mail" onclick="addCookie()" href="#">加入收藏</a>
89.              </div>
90.              
91.              <!-- <ul id="main-nav" class="dropdown dropdown-linear">-->
92.              <ul id="main-nav" class="dropdown main-menu">
93.                  <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['JCall'][0][0]->__template_JCall(array('module'=>'categories','action'=>'treelist','tpl'=>'main_menu'),$_smarty_tpl);?>
94. 
95.              </ul>
96.          </div>
97.      </div>
98.      
427.              $_smarty_tpl $this;
428.              ob_start();
429.              if ($this->resource_object->isEvaluated) {
430.                  eval("?>" $this->compiled_template);
431.              } else {
432.                  include($this->getCompiledFilepath ()); 
433.                  // check file dependencies at compiled code
434.                  if ($this->smarty->compile_check) {
435.                      if (!empty($this->properties['file_dependency'])) {
436.                          $this->mustCompile false;
437.                          $resource_type null;
562.            if ($this->isCached === null) { 
563.              $this->isCached(false); 
564.            }
565.            if (!$this->isCached) {          
566.              // render template (not loaded and not in cache)
567.              $this->renderTemplate();
568.            }
569.          
570.          $this->updateParentVariables();
571.          $this->isCached null;
572.          return $this->rendered_content;
333.          
334.          // return rendered template
335.          if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) {
336.              $_output Smarty_Internal_Filter_Handler::runFilter('output'$_template->getRenderedTemplate(), $_template);
337.          } else {
338.              $_output $_template->getRenderedTemplate();
339.          
340.          $_template->rendered_content null;
341.          if (isset($this->error_reporting)) {
342.              error_reporting($_smarty_old_error_level);
343.          
377.       * @param object $parent next higher level of Smarty variables
378.       */
379.      public function display($template$cache_id null$compile_id null$parent null)
380.      
381.          // display template
382.          $this->fetch ($template$cache_id$compile_id$parenttrue);
383.      
384. 
385.      /**
386.       test if cache i valid
387.       
51.      {
52.          try {
53.                  $this->addfuncs();
54.                  $this->displayed TRUE;
55.                  if($GLOBALS['G_JCONFIG']['view']['debugging'] && debugMode)$this->engine->debugging TRUE;
56.                  $this->engine->display($tplname);
57.          } catch (Exception $e) {
58.              JError$GLOBALS['G_JCONFIG']['view']['engine_name']. ' Error: '.$e->getMessage() );
59.          }
60.      }
61.      
149.       */
150.      public function display($tplname$output TRUE)
151.      {
152.          @ob_start();
153.          if(TRUE == $GLOBALS['G_JCONFIG']['view']['enabled']){
154.              $this->v->display($tplname);
155.          }else{
156.              extract($this->__template_vals);
157.              require($tplname);
158.          }
159.          if( TRUE != $output )return ob_get_clean();
97.                  $tplfile str_replace($GLOBALS['G_JCONFIG']['view']['template_file_suffix'], '_' $this->getLang() . $GLOBALS['G_JCONFIG']['view']['template_file_suffix'], $tplname);
98.                  if($this->v->engine->templateExists($tplfile)) {
99.                      $this->display($tplfile);
100.                  }
101.                  else if($this->v->engine->templateExists($tplname)) {
102.                      $this->display($tplname);
103.                  }
104.                  else {
105.                      JError("模板文件{$tplname}不存在!");    
106.                  }
107.              }
51.          else {
52.              $__tplname $__controller.$GLOBALS['G_JCONFIG']['view']['auto_display_sep'].
53.                      $__action.$GLOBALS['G_JCONFIG']['view']['template_file_suffix']; // 拼装模板路径
54.          }
55.          if($__tplname) {
56.              $__handle_controller->auto_display($__tplname);
57.          }
58.      }
59. 
60.      // 对路由进行后续相关操作
61.      JInject("router_postfilter");
105.  if(count($server_info) > 1) {
106.      $server_domain $server_info[count($server_info)-2];
107.      define('DOMAIN'$server_domain);
108.  }
109. 
110.  JStart();
111.  ?>