关于PHP引入CSS、JS、图片等外部文件
如果你的页面有引用CSS、JS以及图片,例如:sample.css、sample.js、sample.jpg,可以将这些文件一并复制到主题目录下,然后引用地址改为:
<link href="<?php echo get_theme_file_uri( 'sample.css' ); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo get_theme_file_uri( 'sample.js' ); ?>" type="text/javascript"></script>
<img src="<?php echo get_theme_file_uri( 'sample.jpg' ); ?>" />
©️李联华的博客网 当前IP地址:3.15.137.94,归属地:俄亥俄州Dublin ,欢迎您的访问!
温馨提示 : 非特殊注明,否则均为李联华的博客原创文章,本站文章未经授权禁止任何形式转载
文章链接:https://www.ooize.com/about-php-importing-css-js-pictures-and-other-external-files.html
文章链接:https://www.ooize.com/about-php-importing-css-js-pictures-and-other-external-files.html
订阅
登录
0 评论