页面重定向问题

/**
 * 页面重定向
 * @param $location
 */
function urls_redirect( $location ) {
    if( !headers_sent() ) {
        header( "Location: $location" );
    } else {
        echo '<script type="text/javascript">
              window.location="$location";
              </script>';
    }
    die();
}

 

posted on 2014-09-26 15:11  lsl8966  阅读(142)  评论(0编辑  收藏  举报