本文整理匯總了PHP中validator::debug方法的典型用法代碼示例。如果您正苦於以下問題:PHP validator::debug方法的具體用法?PHP validator::debug怎麽用?PHP validator::debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類validator
的用法示例。
在下文中一共展示了validator::debug方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: strtr
echo "<br />\n<strong>{$message['21']}</strong>: {$errors}</p>\n" . "<h2>{$message['16']}</h2>\n";
if (empty($_REQUEST['errors']) || $_REQUEST['errors'] == 'along') {
echo '<code>' . $validator->errors_source() . "</code>\n\n";
} else {
//errors alone
echo '<p>' . $validator->errors_string() . "</p>\n\n";
}
/* no errors found in the document */
} else {
echo "</p><p>{$message['15']}</p>\n";
}
/* show repaired document */
if (!isset($_REQUEST['repair']) || $_REQUEST['repair'] == 'full') {
$html = strtr(nl2br(htmlspecialchars($validator->repaired_source(), ENT_QUOTES, 'UTF-8')), array(' ' => ' '));
echo "\n<p> </p>\n<h2>{$message['17']}</h2>\n";
echo '<div class="code"><code>' . $html . "</code></div>\n";
/* Diff */
} elseif ($_REQUEST['repair'] == 'diff' && ($diff = $validator->repaired_diff())) {
$diff = strtr($diff, array(' ' => ' '));
echo "\n<p> </p>\n<h2>{$message['11']}</h2>\n";
echo '<div class="code"><code>' . $diff . "</code></div>\n";
}
/* there was some error handling the URL/file upload */
} else {
echo "<p>{$message['13']}:<br />\n";
echo nl2br($validator->internal_errors_string()) . "</p>\n";
}
if (isset($_GET['dump_debug'])) {
echo '<pre>' . htmlspecialchars($validator->debug()) . '</pre>';
}
common_footer();