聯(lián)系官方銷售客服
1835022288
028-61286886
<?php if ($zutu) { $key=0; foreach ($zutu as $c) { ?> { {php $cc = current($zutu);} href: "{dr_get_file($cc)}", src: "{dr_get_file($c)}", img: "{dr_get_file($c)}", width: "237", height: "150", title: "{$t['title']}" }, <?php $key++;} } ?>
我想調(diào)用該圖片的寬度的數(shù)值,寫成100%和auto都不行,系統(tǒng)里有沒有這個(gè)變量可以調(diào)出來?
你這又是用循環(huán)又是用單一輸出,思維太混了,影響頁面速度啊
回復(fù)@迅睿框架聯(lián)合創(chuàng)始人
調(diào)出來了,感謝大神,確實(shí)現(xiàn)在這個(gè)代碼的執(zhí)行效率太慢,頁面打開明顯慢多了,怎么優(yōu)化一下速度呢?
回復(fù)@小波工作室 這個(gè)代碼執(zhí)行出現(xiàn)系統(tǒng)故障! 但是我找不出錯(cuò)在哪里?
回復(fù)@小波工作室
FCPATH/App/Module/Extends/Home/Module.php : 510 — Phpcmf\View->display ( arguments )
503 'params' => ['catid' => $catid],
504 'parent' => $parent,
505 'related' => $related,
506 'urlrule' => \Phpcmf\Service::L('Router')->show_url($this->module, $data, '[page]'),
507 'fix_html_now_url' => defined('SC_HTML_FILE') ? dr_url_prefix(\Phpcmf\Service::L('Router')->show_url($this->module, $data, $page), $this->module['dirname'], SITE_ID, \Phpcmf\Service::IS_MOBILE_TPL()) : '', // 修復(fù)靜態(tài)下的當(dāng)前url變量
508 ]);
509 \Phpcmf\Service::V()->module($this->module['dirname']);
510 !$rt && (\Phpcmf\Service::V()->display(isset($data['template']) && strpos($data['template'], '.html') !== FALSE && is_file(\Phpcmf\Service::V()->get_dir().$data['template']) ? $data['template'] : ($this->module['category'][$data['catid']]['setting']['template']['show'] ? $this->module['category'][$data['catid']]['setting']['template']['show'] : 'show.html')));
511 return $data;
512 }
513
514 // 模塊草稿、審核、定時(shí)、內(nèi)容頁
515 protected function _MyShow($type, $id = 0, $page = 1) {
516
517 if (IS_POST) {
APPPATH/Controllers/Show.php : 23 — Phpcmf\Home\Module->_Show ( arguments )
16 }
17 $this->_Show(
18 (int)$id,
19 [
20 'field' => dr_safe_replace(\Phpcmf\Service::L('Input')->get('field')),
21 'value' => dr_safe_replace(\Phpcmf\Service::L('Input')->get('value')),
22 ],
23 max(1, (int)\Phpcmf\Service::L('Input')->get('page'))
24 );
25 }
26
27 public function time() {
28 $this->_module_init();
29 $this->_MyShow(
30 'time',
SYSTEMPATH/CodeIgniter.php : 832 — Phpcmf\Controllers\Show->index ()
825 {
826 // If this is a console request then use the input segments as parameters
827 $params = defined('SPARKED') ? $this->request->getSegments() : $this->router->params();
828
829 if (method_exists($class, '_remap')) {
830 $output = $class->_remap($this->method, ...$params);
831 } else {
832 $output = $class->{$this->method}(...$params);
833 }
834
835 $this->benchmark->stop('controller');
836
837 return $output;
838 }
839
SYSTEMPATH/CodeIgniter.php : 419 — CodeIgniter\CodeIgniter->runController ( arguments )
412 if (! method_exists($controller, '_remap') && ! is_callable([$controller, $this->method], false)) {
413 throw PageNotFoundException::forMethodNotFound($this->method);
414 }
415
416 // Is there a "post_controller_constructor" event?
417 Events::trigger('post_controller_constructor');
418
419 $returned = $this->runController($controller);
420 } else {
421 $this->benchmark->stop('controller_constructor');
422 $this->benchmark->stop('controller');
423 }
424
425 // If $returned is a string, then the controller output something,
426 // probably a view, instead of echoing it directly. Send it along
SYSTEMPATH/CodeIgniter.php : 326 — CodeIgniter\CodeIgniter->handleRequest ( arguments )
319 $this->response->pretend($this->useSafeOutput)->send();
320 $this->callExit(EXIT_SUCCESS);
321
322 return;
323 }
324
325 try {
326 return $this->handleRequest($routes, $cacheConfig, $returnResponse);
327 } catch (RedirectException $e) {
328 $logger = Services::logger();
329 $logger->info('REDIRECTED ROUTE at ' . $e->getMessage());
330
331 // If the route is a 'redirect' route, it throws
332 // the exception with the $to as the message
333 $this->response->redirect(base_url($e->getMessage()), 'auto', $e->getCode());
FCPATH/Fcms/Init.php : 523 — CodeIgniter\CodeIgniter->run ()
516 $env = new DotEnv(COREPATH);
517 $env->load();
518
519 helper('url');
520
521 $app = new \Phpcmf\Extend\CodeIgniter(new App());
522 $app->initialize();
523 $app->run();
回復(fù)@游子2018 試試這樣寫