I have url like this http://localhost/project/test/value#value2. when i hit this url i want to fetch #tag value on server.
I tried like this on server side
    <?php 
   function test(param){ ?> 
       <script> 
          var className = window.location.hash;  
          alert(className);
       </script> 
   <?php 
    } ?>
this alert giving me class name but after page load if i assign this value to php variable its not working. I m using codeigniter so i tried this current_url() function and also i tried $_SERVER['REQUEST_URL'] but its not working in my case
 
     
     
     
     
     
    