如何使用CI访问tpl文件下的徽标或图像?

时间:2018-10-26 13:31:18

标签: php codeigniter

如何访问tpl文件下的徽标或图像?

例如

<?php echo $view->logo;  ?> calling from the home page showing me the logo 

,但是在menu.tpl文件下,该结果未显示任何结果。以下是我遇到的例外情况

Notice: Undefined property: stdClass::$logo in /var/www/yoursite.com/application/views/default/application/client/countyx/menu_client.tpl on line: 12

File: /var/www/yoursite.com/application/views/default/application/client/countyx/menu_client.tpl, on line 12, Error->error_handler()
File: /var/www/yoursite.com/system/view.php, on line 149, Undefined->require()
File: /var/www/yoursite.com/application/controllers/wrapper_client.php, on line 81, View->render()
File: Undefined, on line Undefined, Wrapper_clientController->indexAction()
File: /var/www/yoursite.com/system/layout.php, on line 236, ReflectionMethod->invoke()
File: /var/www/yoursite.com/system/response.php, on line 107, Layout->add_wrapper()
File: /var/www/yoursite.com/default.php, on line 194, Response->output()
Logged Data:
    SELECT id, menu_title AS title, parent_id, friendly_url, external, highlight FROM prefix_pages WHERE owner_id = '408' AND active = '1' AND menu = '1' ORDER BY sort_id LIMIT 1000 

0 个答案:

没有答案