本文整理汇总了PHP中filesystem::chpath方法的典型用法代码示例。如果您正苦于以下问题:PHP filesystem::chpath方法的具体用法?PHP filesystem::chpath怎么用?PHP filesystem::chpath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类filesystem
的用法示例。
在下文中一共展示了filesystem::chpath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
if (!isset($_GET['dirperms']) || !isset($_GET['fileperms']) || !isset($_SESSION['flist'])) {
header("Location: ./404.php");
exit;
}
if (!isset($_GET['getcwd'])) {
$getcwd = OPEN;
} else {
$getcwd = ___realpath(trim($_GET['getcwd']));
}
xhtml_head("批量改权");
if (count($_SESSION['flist']) < 1) {
echo "<div class=\"error\">\n";
echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">返回</a>]抱歉,文件清单为空!\n";
echo "</div>\n";
} else {
$i = 0;
$fs = new filesystem();
echo "<div class=\"like\">\n";
echo "<a href=\"./index.php?path=" . urlencode($getcwd) . "\">文件列表</a>(操作结果)\n";
echo "</div>";
while ($i < count($_SESSION['flist'])) {
$fs->chpath($tmp = $_SESSION['flist'][$i]);
if ($fs->chmod(trim($_GET['dirperms']), trim($_GET['fileperms']))) {
echo "<div class=\"love\">[{$i}][√] - {$tmp}</div>\n";
} else {
echo "<div class=\"error\">[{$i}][×] - {$tmp}</div>\n";
}
$i++;
}
}
xhtml_footer();
示例2: urlencode
echo "<option value=\"delete\">删除文件(多选)</option>\n";
echo "<option value=\"create\">建立数据(目录)</option>\n";
echo "<option value=\"upload\">本地远程(上传)</option>\n";
echo "<option value=\"addlist\">文件清单(加入)</option>\n";
echo "<option value=\"sendfile\">发送文件(邮箱)</option>\n";
if (function_exists("shell_exec")) {
echo "<option value=\"shell_exec\">终端命令(高级)</option>\n";
}
echo "</select>\n";
echo "<input type=\"submit\" value=\"执行\" />\n";
echo "(<a href=\"?path=" . urlencode($path) . "&select{$multiple}\">全选</a>|<a href=\"?path=" . urlencode($path) . "{$multiple}\">消选</a>)\n";
echo "</div>\n";
if (count($data[0]) != 0) {
echo "\n<div class=\"like\">目录列表</div>\n";
foreach ($data[0] as $tmp) {
$filesystem->chpath($tmp);
echo "<div class=\"love\">\n";
echo "<input type=\"checkbox\" name=\"flist[]\" value=\"" . urlencode($tmp) . "\" {$select}/>\n";
echo ($perms = $filesystem->getperms()) == false ? "[????]" : "[{$perms}]";
echo "<a href=\"?path=" . urlencode($tmp) . "{$multiple}\">" . ___basename($tmp) . "</a>\n";
if (is_link($tmp)) {
echo "[ Link -> " . readlink($tmp) . " ]";
}
echo "(<a href=\"./rename.php?path=" . urlencode($tmp) . "\">命名</a>|<a href=\"./autocp.php?path=" . urlencode($tmp) . "\">复件</a>)\n";
echo "</div>\n";
}
}
if (count($data[1]) != 0) {
echo "\n<div class=\"like\">文件列表</div>\n";
foreach ($data[1] as $tmp) {
$filesystem->chpath($tmp);