반응형
예를 들어.. 현재주소가 " http://tistory.com/example/ex.html " 라면..
echo $_SERVER['PHP_SELF']; – /example/ex.html
echo dirname($_SERVER['PHP_SELF']); – /example
echo basename($_SERVER['PHP_SELF']); – ex.html
echo $_SERVER[HTTP_HOST]; – tistory.com
반응형