tp5css and js introduced issues

Because previously used the tp3.2, now switch to tp5 develop personal blog, I had some pit at the time of the introduction of CSS and JS

It needs to be added in the public path in 3.2 times in the tp5 introduced directly to static.

Add the following in config.php

<?php
return[
    'view_replace_str'       => [
        '__CSS__'   =>  'static/index/css',
        '__IMG__'   =>   'static/index/images',
        '__JS__'    =>  'static/index/js'
    ],
];

 

Module creates a corresponding folder in the public / static, the introduction path in the view file is as follows:

So far, the success of the introduction of external style file.

come on!~

Guess you like

Origin www.cnblogs.com/dlmg/p/11326823.html