I have some urls like http://www.domainname.com/m1.php?#m2.php?more=apple&starting=1
How to use PHP to get the value $_GET['more'] & $_GET['starting']?
Is it possible use js href.split to get the value hehind hash #?
Updated question:
Add some code as below: I still get the $_GET['fragment'] = m2.php?more=apple, but lose the &starting=1, How do I do next?
<script type="text/javascript">
var parts = location.href.split('#');
if(parts.length > 1)
{
var params = parts[0].split('?');
var mark = '?';
if(params.length > 1)
{
mark = '&';
}
location.href = parts[0] + mark + 'fragment=' + parts[1];
}
</script>
<?php
if(isset($_GET['fragment']))
{
echo $_GET['fragment'];
}
?>
In php you simply can’t see the fragment requested.
You can see it only with javascript