本文整理匯總了PHP中Sanitizer::addUnderScore方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sanitizer::addUnderScore方法的具體用法?PHP Sanitizer::addUnderScore怎麽用?PHP Sanitizer::addUnderScore使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sanitizer
的用法示例。
在下文中一共展示了Sanitizer::addUnderScore方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
if (isset($_GET['id'])) {
$id = $_GET['id'];
$data = $article->fetch_data($id);
//check in case empty results set is returned
if (!is_array($data)) {
echo "<h2>Error! Page Not Found!</h2>";
exit;
}
?>
<!--display content here!-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php
echo $sanitize->addUnderScore($data['article_title']);
?>
</title>
<link rel="stylesheet" href="../../assets/style.css">
</head>
<body>
<div class="container">
<a href="../index.php" id="logo">CMS</a>
<h4>
<?php
echo $data['article_title'];
?>
-
<small>
posted <?php
echo date('l jS', $data['article_timestamp']);
示例2: date
<meta charset="UTF-8">
<title>CMS Full</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<div class="container">
<a href="index.php" id="logo">CMS</a>
<ol>
<?php
foreach ($articles as $article) {
?>
<li>
<a href="article/<?php
echo $sanitize->addUnderScore($article['article_title']) . '/' . $article['article_id'];
?>
"><?php
echo $article['article_title'];
?>
</a>
-<small>
posted <?php
echo date('l jS', $article['article_timestamp']);
?>
</small>
</li>
<?php
}
?>
</ol>