Hi.
I have a structure like this;
/
/classes
/js
myJavascripts.js
/images
app-icon.png
/templates
/include
header_config.php
/news
/languages
/tracks
/time
index.php
config.php
I want to include header_config.php all over the project, but depending on where I include the file it fails to load my js, css, png files:
header_config.php is something like this:
<html>
<head>
<title>Test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="myStyles.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
var appUrl = '<?php echo APP_URL ?>';
</script>
<script type="text/javascript" src="js/myJavascripts.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="images/app-icon.png">
</head>
<body>
If I include header_config.php in index.php, there is no problem because I'm in the root, but if I include header_config.php in /news/index.php I get errors because the route to my js and image files is lost.
How can I achieve this stuff??.
Thanks