{"id":8,"date":"2005-09-27T08:19:51","date_gmt":"2005-09-27T13:19:51","guid":{"rendered":"http:\/\/www.juixe.com\/techknow\/?p=8"},"modified":"2005-09-27T08:19:51","modified_gmt":"2005-09-27T13:19:51","slug":"import-script-import-css-import-php","status":"publish","type":"post","link":"http:\/\/juixe.com\/techknow\/index.php\/2005\/09\/27\/import-script-import-css-import-php\/","title":{"rendered":"Import Script, Import CSS, Import PHP"},"content":{"rendered":"<p>Just because sometimes I forget, here are some code fragments to import JavaScript, CSS, and PHP files.<\/p>\n<p>JavaScript:<\/p>\n<pre>\n&lt;script\n   type='text\/javascript'\n   src='directory\/file.js'&gt;\n&lt;\/script&gt;\n<\/pre>\n<p>CSS:<\/p>\n<pre>\n&lt;style type='text\/css'  media='all'&gt;\n   @import 'directory\/file.css';\n&lt;\/style&gt;\n<\/pre>\n<p>Icon:<\/p>\n<pre>\n&lt;link\n   rel='Shortcut Icon'\n   href='directory\/file.ico'\n   type='image\/x-icon'&gt;\n<\/pre>\n<p>PHP:<\/p>\n<pre>\n&lt;?php @ require_once ('directory\/file.html'); ?&gt;\n<\/pre>\n<p>For the PHP import, by placing the @ symbol before require_once suppresses any error messages that might be generated in the included PHP file.<\/p>\n<p>JSP:<\/p>\n<pre>\n&lt;%@ include file='jspfile.jspi' %&gt;\n<\/pre>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just because sometimes I forget, here are some code fragments to import JavaScript, CSS, and PHP files. JavaScript: &lt;script type=&#8217;text\/javascript&#8217; src=&#8217;directory\/file.js&#8217;&gt; &lt;\/script&gt; CSS: &lt;style type=&#8217;text\/css&#8217; media=&#8217;all&#8217;&gt; @import &#8216;directory\/file.css&#8217;; &lt;\/style&gt; Icon: &lt;link rel=&#8217;Shortcut Icon&#8217; href=&#8217;directory\/file.ico&#8217; type=&#8217;image\/x-icon&#8217;&gt; PHP: &lt;?php @ require_once (&#8216;directory\/file.html&#8217;); ?&gt; For the PHP import, by placing the @ symbol before require_once suppresses any error [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[9,13,16,18,3],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p902K-8","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/8"}],"collection":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}