Import Script, Import CSS, Import PHP

Just because sometimes I forget, here are some code fragments to import JavaScript, CSS, and PHP files.

JavaScript:

<script
   type='text/javascript'
   src='directory/file.js'>
</script>

CSS:

<style type='text/css'  media='all'>
   @import 'directory/file.css';
</style>

Icon:

<link
   rel='Shortcut Icon'
   href='directory/file.ico'
   type='image/x-icon'>

PHP:

<?php @ require_once ('directory/file.html'); ?>

For the PHP import, by placing the @ symbol before require_once suppresses any error messages that might be generated in the included PHP file.

JSP:

<%@ include file='jspfile.jspi' %>

And, well, I guess the list can go on and on. You can use Struts Tiles to include other JSP snippets. I am sure that other languages and frameworks have the same functionality.