尊龙凯时人生就是博

ÉîÈëÏàʶthinkphp¼ÓÔØcssÎļþµÄÔ­Àí

ÔÚʹÓÃthinkphp¿ò¼Ü¾ÙÐпª·¢Ê±£¬ÓÐʱ¼ä»áÓöµ½ÎÞ·¨¼ÓÔص½cssÎļþÃûµÄÇéÐΡ£²»µ«»áÓ°ÏìÒ³ÃæµÄ·ºÆðЧ¹û£¬²¢ÇÒ»áÓ°ÏìÍøÕ¾µÄÕûÌåÐÔÄÜ¡£Õë¶ÔÕâÒ»ÎÊÌ⣬ÎÒÃÇÐèÒªÉîÈëÏàʶthinkphp¿ò¼Ü¼ÓÔØcssÎļþµÄÔ­Àí£¬²¢ÕÆÎÕÓÐÓõĽâ¾öÒªÁì¡£

Ò»¡¢thinkphp¿ò¼Ü¼ÓÔØcssÎļþµÄÔ­Àí

ÔÚthinkphp¿ò¼ÜÖУ¬ÎÒÃÇÒ»Ñùƽ³£ÊÇͨ¹ýÒýÈëcssÎļþÀ´ÊµÏÖÍøÒ³ÑùʽµÄÉèÖá£Ïêϸ¶øÑÔ£¬ÎÒÃÇͨ³£»áͨ¹ýÒÔÏÂÁ½ÖÖ·½·¨À´¼ÓÔØcssÎļþ£º

ÔÚHTMLÎļþÖÐÊÖ¶¯ÒýÈëcssÎļþ£¬ÈçÏÂËùʾ£º

<link>

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬hrefÊôÐÔÖ¸¶¨ÁËÑùʽ±íÎļþµÄ·¾¶£¬./ÌåÏÖÄ¿½ñĿ¼¡£

ͨ¹ýÔÚPHP¿ØÖÆÆ÷ÖÐŲÓÃViewÊÓͼ¹¤¾ßµÄassignÒªÁ죬½«cssÎļþ·¾¶×ª´ï¸øÇ°¶ËÒ³Ã棬ÈçÏÂËùʾ£º

<?php namespace app\index\controller;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        $this->assign('css_url','./css/style.css');
        return $this-&gt;fetch();
    }
}
?&gt;

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬$this->assignÒªÁìÖеĵÚÒ»¸ö²ÎÊýÖ¸¶¨ÁËÔÚÇ°¶ËÒ³ÃæÖÐʹÓõıäÁ¿Ãû£¬µÚ¶þ¸ö²ÎÊýÖ¸¶¨ÁËcssÎļþµÄ·¾¶£¬$this->fetch()ÒªÁìÓÃÓÚäÖȾÍøÒ³¡£

Á¬Ã¦Ñ§Ï°¡°PHPÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

¶þ¡¢¿ÉÄܵ¼ÖÂÎÞ·¨¼ÓÔØcssÎļþµÄÔµ¹ÊÔ­ÓÉ

ÔÚʹÓÃthinkphp¿ò¼Ü¼ÓÔØcssÎļþʱ£¬¿ÉÄ᷺ܻÆðÒÔϼ¸ÖÖÇéÐε¼ÖÂÎÞ·¨Õý³£¼ÓÔØcssÎļþ£º

cssÎļþ·¾¶¹ýʧ£ºÔÚHTMLÎļþ»òÕßPHP¿ØÖÆÆ÷ÖÐÖ¸¶¨µÄcssÎļþ·¾¶¹ýʧ»òÕß²»±£´æ£¬»áµ¼ÖÂÎÞ·¨Õý³£¼ÓÔØcssÎļþ¡£

·ÓÉÉèÖÃÎÊÌ⣺ÈôÊÇthinkphp¿ò¼ÜµÄ·ÓÉÉèÖÃÓÐÎ󣬺ñÈûÓн«¶ÔÓ¦µÄURLµØµãÓëÏìÓ¦µÄ¿ØÖÆÆ÷ÒªÁì¶ÔÓ¦ÆðÀ´£¬¾Í¿ÉÄÜ·ºÆðÎÞ·¨¼ÓÔØcssÎļþµÄÕ÷Ïó¡£

¿ò¼Ü°æ±¾¼æÈÝÎÊÌ⣺thinkphp¿ò¼Ü°æ±¾¼æÈÝÎÊÌâÒ²¿ÉÄܵ¼ÖÂÎÞ·¨¼ÓÔØcssÎļþ¡£Õë¶ÔÕâÖÖÇéÐΣ¬ÐèÒªÉîÈëÏàʶ¿ò¼Ü°æ±¾²î±ð£¬²¢¾ÙÐÐÏìÓ¦µÄ°æ±¾¼æÈÝÐÔ´¦Àí¡£

Èý¡¢½â¾öÒªÁì

¼ì²écssÎļþ·¾¶ÊÇ·ñ׼ȷ£ºÕë¶ÔÎÞ·¨¼ÓÔØcssÎļþµÄÇéÐΣ¬ÎÒÃÇ¿ÉÒÔÏȼì²éÒ»ÏÂcssÎļþ·¾¶ÊÇ·ñÓÐÎó£¬È·±£Â·¾¶×¼È·ÎÞÎó¡£

¼ì²é·ÓÉÉèÖÃÊÇ·ñ׼ȷ£ºÔÚʹÓÃthinkphp¿ò¼Üʱ£¬ÎÒÃÇÐèÒªºÜÊÇ×¢ÖØ·ÓÉÉèÖõÄ׼ȷÐÔ£¬È·±£URLµØµãÓëÏìÓ¦µÄ¿ØÖÆÆ÷ÒªÁì¶ÔÓ¦ÆðÀ´¡£

ʹÓÃTP5×Ô´øÒªÁì¼ÓÔØcssÎļþ£ºÔÚ¿ØÖÆÆ÷ÖÐʹÓÃTP5×Ô´øµÄÒªÁì¼ÓÔØcssÎļþ£¬ÒªÁìÈçÏ£º

$this-&gt;assign('css_url','/static/css/index.css');

µÇ¼ºó¸´ÖÆ

×¢ÖØÕâÀïµÄ·¾¶ÐèÒªÏêϸµÄƾ֤ÏîÄ¿À´ÉèÖá£

ʹÓþø¶Ô·¾¶¼ÓÔØcssÎļþ£ºÈôÊÇÒÔÉÏÒªÁ춼ÎÞ·¨½â¾öÎÊÌ⣬Ôò¿ÉÒÔ˼Á¿Ê¹Óþø¶Ô·¾¶À´¼ÓÔØcssÎļþ£¬È·±£Äܹ»¼ÓÔص½×¼È·µÄcssÎļþ¡£

×ÜÖ®£¬ÔÚʹÓÃthinkphp¿ò¼Ü¾ÙÐпª·¢Ê±£¬·ºÆðÎÞ·¨¼ÓÔØcssÎļþµÄÇéÐÎÊǷǾ­³£¼ûµÄ¡£ÎÒÃÇÐèÒªÕë¶ÔÏêϸÇéÐÎÆÊÎöÎÊÌ⣬ƾ֤²î±ðµÄ½â¾öÒªÁì¾ÙÐд¦Àí¡£Ö»ÓÐÔÚÉîÈëÏàʶ¿ò¼ÜµÄ»úÖÆ£¬²¢ÊìÁ·ÕÆÎÕ½â¾öÎÊÌâµÄ¼¼ÇÉ£¬²Å»ªÕæÕý³ÉΪһÃûÀֳɵĿª·¢Õß¡£

ÒÔÉϾÍÊÇÉîÈëÏàʶthinkphp¼ÓÔØcssÎļþµÄÔ­ÀíµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ