先在入口文件定义好
define('APP_DEBUG',TRUE); define('SITE_URL','http://tp.manage.com/'); define('IMG_URL', SITE_URL.'Public/images/'); define('CSS_URL', SITE_URL.'Public/css/'); define('JS_URL', SITE_URL.'Public/js/'); require '../ThinkPHP/ThinkPHP.php';
前台调用:
<img src="{$Think.const.IMG_URL}main_52.gif" width="28" height="28">