location.href是js的代码,并不是php的代码<script type="text/javascript">
location.href = 'http://baidu.com';
</script>
这个代码不存在兼容性问题如果是php用类似的功能应该是
<?php
header('location:http://www.google.com/');
?>
location.href = 'http://baidu.com';
</script>
这个代码不存在兼容性问题如果是php用类似的功能应该是
<?php
header('location:http://www.google.com/');
?>
location.href = "http://baidu.com";
</script>'