I'm using a subdomain but want to use the images, scripts and php files from the primary domain.
I'm getting a Loading Failed error in Firefox Developer for both of the following "src":
<script src="https://www.example.com/php/scripttest2.js"></script> <script src="../php/scripttest2.js"></script>
bst365体育投注网址大全I'm really hoping there is a universal/single solve that addresses all of the below. I'd like to avoid duplicating assets/files as much as possible.
- I've tried this and still can't load scripts. htaccess Access-Control-Allow-Origin
Question 1: Is the following PHP safe?
bst365体育投注网址大全I've been able to load the php scripts from the subdomain index.php file via: "../php/test1.php";
- seemed like I needed a CORS header for the PHP files. Turns out I didn't require this as the "include" worked without the Access-Control-Allow-Origin header.
Question 2: How can I load the IMAGES and CSS w/out an absolute URL?
I haven't been able to get images and CSS to load using a relative path (I can using absolute URL".
This js file path is from the primary domain and references another php file on the primary domain.