admin管理员组文章数量:1417070
I have built a wordpress site locally in a directory /blog I have other site files that are at the web root that I need to access in the WordPress installation, css, js etc.
Locally I included the files by:
<style>
<?php include($_SERVER['DOCUMENT_ROOT'] . 'css/site-style.css'); ?>
</style>
For reasons out of my control we inject the styles into the head instead of wp_enqueue_styles.. I know gross
This worked fine locally, but now that I have deployed the files remotely it no longer works. If I echo the path out I receive the proper file path. Is there a function or way so that I can access the files both locally and remotely outside of the wordpress installation?
thanks for your help!
本文标签:
版权声明:本文标题:paths - Including $_SERVER['DOCUMENT_ROOT'] to load files outside of wordpress installation doesn't work 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745257531a2650189.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论