個人用ツール

「関数リファレンス/BcBaser isCurrentUrl」の版間の差分

提供: baserCMS公式ガイド

移動: 案内, 検索
(Hanhunhun がページ「関数リファレンス/isCurrentUrl」を「関数リファレンス/BcBaser isCurrentUrl」に移動しました)
 
行52: 行52:
  
 
## 関連資料
 
## 関連資料
 +
[[Category:関数リファレンス]]

2016年3月30日 (水) 11:58時点における最新版

説明

指定したURLが現在のURLと同じかどうか判定する。

<比較例>
/news/ | /news/ ・・・○
/news | /news/ ・・・×
/news/ | /news/index ・・・○

使い方

$this->BcBaser->isCurrentUrl($url)

パラメータ

(string) $url
比較対象URL

戻り値

(boolean) 同じ場合には true を返す

用例

基本

コード

<?php $this->BcBaser->isCurrentUrl('/news/') ?>

応用

コード

 

出力

変更履歴

ソースファイル

関連資料