variable $base_path is not working
- by Nidhi Prasad
I am trying to get the value of base_path variable in PHP (on lamp server) .
I have kept the code insider beta_test directory inside www directly.
i.e, base path function should return " /beta_test/ " . But it is returning just single slash ( "/" ) .
The code that I tried is
<script type="text/javascript" src="<?php print base_path(); ?>sites/all/themes/people10/slider/call.js"></script>
Expected output is
<script type="text/javascript" src="/beta_test/sites/all/themes/people10/slider/call.js"></script>
But its giving
<script type="text/javascript" src="/sites/all/themes/people10/slider/call.js"></script>
I am using php version 5.3.3.Can anyone please help me in getting this issue solved? I am newbie to php and drupal .