本文整理匯總了PHP中ViewList::removeView方法的典型用法代碼示例。如果您正苦於以下問題:PHP ViewList::removeView方法的具體用法?PHP ViewList::removeView怎麽用?PHP ViewList::removeView使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ViewList
的用法示例。
在下文中一共展示了ViewList::removeView方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: viewFileName
if (isset($_GET['delete_view'])) {
if (!checkAccess(GangliaAcl::ALL_VIEWS, GangliaAcl::EDIT, $conf)) {
$output = "You do not have access to edit views.";
} else {
if (!$viewList->viewExists($view_name)) {
$output = "<strong>Alert:</strong> View with the name " . $view_name . " does not exist.";
} else {
$view_filename = viewFileName($view_name);
if (pathinfo($view_filename, PATHINFO_DIRNAME) != $conf['views_dir']) {
die('Invalid path detected');
}
if (unlink($view_filename) === FALSE) {
$output = "<strong>Alert:</strong>" . " Can't remove file {$view_filename}." . " Perhaps permissions are wrong.";
} else {
$output = "View has been successfully removed.";
$viewList->removeView($view_name);
}
}
}
}
// delete_view
///////////////////////////////////////////////////////////////////////////////
// Add to view
///////////////////////////////////////////////////////////////////////////////
if (isset($_GET['add_to_view'])) {
if (!checkAccess(GangliaAcl::ALL_VIEWS, GangliaAcl::EDIT, $conf)) {
$output = "You do not have access to edit views.";
} else {
if (!$viewList->viewExists($view_name)) {
$output = "<strong>Alert:</strong> View " . $view_name . " does not exist. This should not happen.";
} else {