We can include external files for PHP, javascript, and css. Using external files is really good for us because we can save a lot of time coding by using it more and more time.
For example, you have already make a css file to custom your html code for all your web page, then you can just link it to every page on your html file. So if you want to change the color of your web page background, you just need to change only 1 file and it will affected to all your web page. Here is the way to include external file.
For php:
include ("filename.php");
require ("filename.php");
include and require are same but they are different when there is an error occurs.
include will generate warning but it continues the script. require will generate fatal error and stop the script.
For javascript:
<script type="text/javascript" src="filename.js"></script>
For css:
<link rel="stylesheet" type="text/css" href="filename.css" />
Hope this can help you
Welcome visitors of MIC Computer
Welcome to my blog. With this blog you can post your question about computer and programming for absolutely free (free consultation sponsored by MIC Computer).. Well what are you waiting for just feel free to post your question or share with me about your computer / programming experience
Monday, March 19, 2012
Include external files for php, javascript, and css
posting by Michael at 1:48 PM
Labels: CSS, Javascript, PHP
Subscribe to:
Post Comments (Atom)
1 comment:
Bengali Online News Portal / বাংলা অনলাইন নিউজ ওয়েবসাইট
Install the Mobile News App / এই নিউজ অ্যাপটা ইন্সটল করো
Post a Comment