TOP ▲ itcore TOP プログラムパーツ

location 指定したURLへジャンプする。 | itcore 2019年

PHP

PHP TOP

関数

<?php
function uLocation($url) {
  header("location: $url");
  exit();
}
?>

テストプログラム

<?php include_once "location.func"; ?>
<?php
  // uLocation("/");
?>

実行結果