PHP Logo

If you are a PHP programmer and tried to insert External or Internal CSS or JavaScript file and you get your CSS style not Work, here is the simple solution to make your Code Work Perfectly.

PHP Logo

Include internal CSS file

<style>
<?php include ('path-to-css-file.css'); ?>
</style>

Include internal JavaScript file

<script>
<?php include ('path-to-javascript-file.js'); ?>
</script>

Include External CSS or JavaScript file :

<?php
//include CSS Style Sheet
echo "<link rel='stylesheet' type='text/css' href='path-to-css-file.css' />";
//include a javascript file
echo "<script type='text/javascript' src='path-to-javascript-file.js'></script>";
?>

About The Author

Jack Nilson