Want to load a jquery file in the View view file, use relative path to display the file can not be found, using absolute path display 403 forbidden, but in the Dreamwaver file can be loaded, do not know how to load this file?
Reply content:
Want to load a jquery file in the View view file, use relative path to display the file can not be found, using absolute path display 403 forbidden, but in the Dreamwaver file can be loaded, do not know how to load this file?
General static files are all placed under the root directory, you can use Site_url ();. " /js/jquery.js "This way to load
If JS is stored in/static/js/jquery.js CI has site_url function, you can return to the website address, splicing a bit on the line.
1.dreamware is a software, CodeIgniter is a PHP framework, the two are not.
2. Place the JS folder in the root directory of the Web site, and then write the script tag
src="
js/jquery.js"
Thank you for the answer, because the application directory has a. htaccess file with a deny from all, so it can't be loaded, go to the root directory.