$ _SERVER [ 'REQUEST_URI']이 (가) 출력 한 첫 번째 폴더를 제거하고 싶습니다.
는// I use it as language switcher in my website, here's how it works:
<?php $currenturl=$_SERVER['REQUEST_URI']; ?>
<a href="https://mysite.com/<?php echo $currenturl ?>">United States</a>
<a href="https://mysite.com/ca<?php echo $currenturl ?>">Canada</a>
<a href="https://mysite.com/br<?php echo $currenturl ?>">Brasil</a>
문제는 캐나다에서 예를 들어,이 출력됩니다 :
https://mysite.com/ca/ca/mypage
그것은
내가 볼 수없는 아웃 링크를 클릭 할 때 단순히 – praveen
를 연결할 수 없습니다 말한다 넣어 그래, 단지 설명하는거야, hehe 링크를 자세히 살펴 보자. –