本文整理汇总了PHP中FileUploader::getFileName方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUploader::getFileName方法的具体用法?PHP FileUploader::getFileName怎么用?PHP FileUploader::getFileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUploader
的用法示例。
在下文中一共展示了FileUploader::getFileName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
require_once realpath(dirname(__FILE__)) . '/../../../../config_path.inc.php';
/**
* Clear node and layout variable in $_SESSION
*/
$variableToClearAR = array('node', 'layout', 'course', 'user');
/**
* Users (types) allowed to access this module.
*/
$allowedUsersAr = array(AMA_TYPE_SWITCHER, AMA_TYPE_STUDENT, AMA_TYPE_AUTHOR, AMA_TYPE_TUTOR);
/**
* Get needed objects
*/
$neededObjAr = array(AMA_TYPE_STUDENT => array('layout'), AMA_TYPE_SWITCHER => array('layout'), AMA_TYPE_AUTHOR => array('layout'), AMA_TYPE_TUTOR => array('layout'));
/**
* Performs basic controls before entering this module
*/
$trackPageToNavigationHistory = false;
require_once ROOT_DIR . '/include/module_init.inc.php';
require_once ROOT_DIR . '/browsing/include/browsing_functions.inc.php';
require_once ROOT_DIR . '/include/FileUploader.inc.php';
$fileUploader = new FileUploader(ADA_UPLOAD_PATH . $userId . '/');
// $fieldUploadName);
if ($fileUploader->upload(true) == false) {
$data = $fileUploader->getErrorMessage();
} else {
$_SESSION['uploadHelper']['filename'] = $fileUploader->getPathToUploadedFile();
$_SESSION['uploadHelper']['fileNameWithoutPath'] = $fileUploader->getFileName();
$data = '1';
// '1' means okay
}
echo $data;