本文整理汇总了PHP中FileData::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP FileData::exists方法的具体用法?PHP FileData::exists怎么用?PHP FileData::exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileData
的用法示例。
在下文中一共展示了FileData::exists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
$current_user_dept = $user_perms_obj->user_obj->getDeptId();
$data_id = $_REQUEST['id'];
// includes
$department_query = "SELECT department FROM {$GLOBALS['CONFIG']['db_prefix']}user WHERE id=:user_id";
$department_stmt = $pdo->prepare($department_query);
$department_stmt->bindParam(':user_id', $_SESSION['uid']);
$department_stmt->execute();
$result = $department_stmt->fetchAll();
if ($department_stmt->rowCount() != 1) {
header('Location:error.php?ec=14');
exit;
//non-unique error
}
$filedata = new FileData($data_id, $pdo);
// error check
if (!$filedata->exists()) {
header('Location:error.php?ec=2');
exit;
} else {
$category = $filedata->getCategory();
$realname = $filedata->getName();
$description = $filedata->getDescription();
$comment = $filedata->getComment();
$owner_id = $filedata->getOwner();
$department = $filedata->getDepartment();
//CHM
$table_name_query = "SELECT table_name FROM {$GLOBALS['CONFIG']['db_prefix']}udf WHERE field_type = '4'";
$table_name_stmt = $pdo->prepare($table_name_query);
$table_name_stmt->execute();
$result = $table_name_stmt->fetchAll();
$num_rows = $table_name_stmt->rowCount();