本文整理匯總了PHP中Localize::gettext方法的典型用法代碼示例。如果您正苦於以下問題:PHP Localize::gettext方法的具體用法?PHP Localize::gettext怎麽用?PHP Localize::gettext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Localize
的用法示例。
在下文中一共展示了Localize::gettext方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: displayErrorPage
if ($biblioQ->errorOccurred()) {
$biblioQ->close();
displayErrorPage($biblioQ);
}
if (!($biblio = $biblioQ->doQuery($bibid))) {
$biblioQ->close();
displayErrorPage($biblioQ);
}
// get image path
$imgname = $biblio->_biblioFields['902a']->_fieldData;
$imgpath = '../' . COVER_PATH . '/' . $imgname;
$thumbpath = '../' . COVER_PATH . '/' . 'thumb_' . $imgname;
if (file_exists($imgpath)) {
chmod($imgpath, 666);
// Windows platform compatibility, 666 is for "Nobody"
unlink($imgpath);
}
if (file_exists($thumbpath)) {
chmod($thumbpath, 666);
unlink($thumbpath);
}
if (!$biblioQ->deleteCoverImage($bibid)) {
$biblioQ->close();
displayErrorPage($biblioQ);
}
$biblioQ->close();
if ($_GET['redirect'] == 'edit') {
header("Location: ../catalog/biblio_edit.php?bibid=" . U($bibid) . "&msg=" . U($loc->gettext("This biblio's cover image has been removed.")));
} else {
header('Location: ../shared/biblio_view.php?bibid=' . U($bibid) . "&msg=" . U($loc->gettext("This biblio's cover image has been removed.")));
}