PHP CI framework in the loading of CSS and JS file failure reasons and solutions,
In the integration of HTML pages into the CI framework, the loading of CSS and JS failed to get a half day to find that the CI framework is the framework of the portal,
All requests for files in the framework need to be processed by index.php, and when loading external CSS and JS files, the
Use the Base_url () function to handle external links.
Like what:
The base_url in the config configuration file is: "localhost:8080/Project name/"
Accessing the Application/resource/aaa.js file in the controller
Relative path access failed
1, directly in the SRC output
2. Borrowing base tags
Place the output of the Base_url () in the < Base href = "<?php echo base_url (); > "/> tag inside, so in
Page inside the call is more convenient.
http://www.bkjia.com/PHPjc/852378.html www.bkjia.com true http://www.bkjia.com/PHPjc/852378.html techarticle php CI framework loading CSS and JS file failure reasons and solutions, in the integration of HTML pages into the CI framework, the loading of CSS and JS failed to get a half day to find the CI framework is the Portal box ...