[PHP] URLによって分岐する。

ソース

<?php
$url = $_SERVER&#91;'REQUEST_URI'&#93;;
 ?>
<?php if($url == "/photo/facility/aaaaaaaaaa/"){ ?>
aaaaaaaaaaaaaaa
<?php }else if($url == "/photo/facility/bbbbbbbbbb/"){ ?>
bbbbbbbbbbbbbbbb
<?php }else if($url == "/photo/facility/cccccccccc/"){ ?>
cccccccccccccccc
<?php }else if($url == "/photo/facility/dddddddddd/"){ ?>
ddddddddddddddd
<?php }else if($url == "/photo/"){ ?>
eeeeeeeeeeeeeeee
<?php } ?>

Similar posts