本文整理汇总了PHP中Actions::newFolder方法的典型用法代码示例。如果您正苦于以下问题:PHP Actions::newFolder方法的具体用法?PHP Actions::newFolder怎么用?PHP Actions::newFolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Actions
的用法示例。
在下文中一共展示了Actions::newFolder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* The main function, checks if the user wants to perform any supported operations
*
* @param string $location current location
*
* @return checks if any action is required
*/
public function run($location)
{
$postuserdir = filter_input(INPUT_POST, "userdir", FILTER_SANITIZE_STRING);
$postnewname = filter_input(INPUT_POST, "newname", FILTER_SANITIZE_STRING);
if ($postuserdir) {
// add new folder
Actions::newFolder($location, $postuserdir);
} elseif (isset($_FILES['userfile']['name'])) {
// upload files
$this->uploadMulti($_FILES['userfile']);
} elseif ($postnewname) {
// rename files or folders
$postoldname = filter_input(INPUT_POST, "oldname", FILTER_SANITIZE_STRING);
$postnewname = Utils::normalizeStr($postnewname);
$this->setRename($postoldname, $postnewname);
} else {
// no post action
$getdel = filter_input(INPUT_GET, "del", FILTER_SANITIZE_STRING);
// delete files or folders
if ($getdel && GateKeeper::isUserLoggedIn() && GateKeeper::isAllowed('delete_enable')) {
$getdel = str_replace(' ', '+', $getdel);
$getdel = urldecode(base64_decode($getdel));
$getdel = EncodeExplorer::extraChars($getdel);
$this->setDel($getdel);
}
}
}