The issue is, I am testing my website using XAMPP on my PC and it's working perfectly. When I check it on my mobile device, it starts creating the problems.
After spending an hour behind it, I figured that the problem is that the mobile device is not running the echo inside the src or href attribute. Here is my code:
<link href="<?php echo config['url']['css'];?>/style.css" rel="stylesheet" type="text/css">
Now, the link is clearly not misplaced because it's working on my PC. Furthermore, the images that I have used:
<img src="<?php echo config['url']['images']; ?>/someimage.jpg" alt="Missing">
Is giving me the same problem. Shows up on my PC but on mobile just the alt appears. But other echos and includes are working (Hence the site's content is showing, but without style or the image tags). This is working, for example:
<title>Website Name - <?php echo $config['title'][$page]; ?></title>
If I use the relative path directly, without echoing variables, it works just as it should:
<link href="resources/css/style.css" rel="stylesheet" type="text/css">
So, my mobile devices are getting the correct access privileges to those folders (which could have been a reason for this). Just in case, I double checked my conf files and checked if access has been granted. They have been.
btw, the devices are iPhone and iPad running IOS 9.3.1 and the issue has been tested on safari only. Did not use any other browser in the mobile devices. I will update it once I get around to testing it on other devices.