本文整理汇总了PHP中filesystem::has_read_permission2方法的典型用法代码示例。如果您正苦于以下问题:PHP filesystem::has_read_permission2方法的具体用法?PHP filesystem::has_read_permission2怎么用?PHP filesystem::has_read_permission2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类filesystem
的用法示例。
在下文中一共展示了filesystem::has_read_permission2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
$page_title = htmlspecialchars($path);
require $GO_THEME->theme_path . 'header.inc';
echo $popup_feedback;
echo '<form name="filesystem" method="post" action="' . $_SERVER['PHP_SELF'] . '" enctype="multipart/form-data">';
echo '<input type="hidden" name="path" value="' . $path . '" />';
echo '<input type="hidden" name="return_to_path" value="' . $return_to_path . '" />';
echo '<input type="hidden" name="share_path" />';
switch ($task) {
case 'mail_files':
$_SESSION['attach_array'] = array();
$_SESSION['num_attach'] = 0;
require $email_module['class_path'] . "email.class.inc";
$email = new email();
if (isset($_POST['files'])) {
while ($file = smartstrip(array_shift($_POST['files']))) {
if ($fs->has_read_permission2($GO_SECURITY->user_id, $file)) {
$tmp_file = $GO_CONFIG->tmpdir . md5(uniqid(time()));
if ($fs->chroot_copy_r2($file, $tmp_file)) {
$filename = basename($file);
$extension = get_extension($filename);
if (!($type = $filetypes->get_type($extension))) {
$type = $filetypes->add_type($extension);
}
$email->register_attachment($tmp_file, $filename, $fs->chroot_filesize($file), $type['mime']);
}
} else {
$popup_feedback .= access_denied_box(basename($file));
}
}
echo '<script type="text/javascript" language="javascript">';
echo 'popup("' . $email_module['url'] . 'send.php?email_file=true","' . $GO_CONFIG->composer_width . '","' . $GO_CONFIG->composer_height . '");';