本文整理汇总了PHP中FileUploader::processInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUploader::processInfo方法的具体用法?PHP FileUploader::processInfo怎么用?PHP FileUploader::processInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUploader
的用法示例。
在下文中一共展示了FileUploader::processInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: IM_Entry
function IM_Entry($datasource, $options, $dbspecification, $debug = false)
{
global $g_dbInstance, $g_serverSideCall;
// check required PHP extensions
$requiredFunctions = array('mbstring' => 'mb_internal_encoding');
if (isset($options) && is_array($options)) {
foreach ($options as $key => $option) {
if ($key == 'authentication' && isset($option['user']) && is_array($option['user']) && array_search('database_native', $option['user']) !== false) {
// Native Authentication requires BC Math functions
$requiredFunctions = array_merge($requiredFunctions, array('bcmath' => 'bcadd'));
break;
}
}
}
foreach ($requiredFunctions as $key => $value) {
if (!function_exists($value)) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
$generator->generateErrorMessageJS("PHP extension \"" . $key . "\" is required for running INTER-Mediator.");
return;
}
}
if ($debug) {
$dc = new DefinitionChecker();
$defErrorMessage = $dc->checkDefinitions($datasource, $options, $dbspecification);
if (strlen($defErrorMessage) > 0) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
$generator->generateErrorMessageJS($defErrorMessage);
return;
}
}
// file_put_contents("/tmp/php2.log", "POST: " . var_export($_POST, true), FILE_APPEND);
// file_put_contents("/tmp/php2.log", "GET: " . var_export($_GET, true), FILE_APPEND);
// file_put_contents("/tmp/php2.log", "FILES: " . var_export($_FILES, true), FILE_APPEND);
// file_put_contents("/tmp/php2.log", "SERVER: " . var_export($_SERVER, true), FILE_APPEND);
if (isset($g_serverSideCall) && $g_serverSideCall) {
$dbInstance = new DB_Proxy();
$dbInstance->initialize($datasource, $options, $dbspecification, $debug);
$dbInstance->processingRequest("NON");
$g_dbInstance = $dbInstance;
} else {
if (!isset($_POST['access']) && isset($_GET['uploadprocess'])) {
$fileUploader = new FileUploader();
$fileUploader->processInfo();
} else {
if (!isset($_POST['access']) && isset($_GET['media'])) {
$dbProxyInstance = new DB_Proxy();
$dbProxyInstance->initialize($datasource, $options, $dbspecification, $debug);
$mediaHandler = new MediaAccess();
if (isset($_GET['attach'])) {
$mediaHandler->asAttachment();
}
$mediaHandler->processing($dbProxyInstance, $options, $_GET['media']);
} else {
if (isset($_POST['access']) && $_POST['access'] == 'uploadfile' || isset($_GET['access']) && $_GET['access'] == 'uploadfile') {
$fileUploader = new FileUploader();
if (IMUtil::guessFileUploadError()) {
$fileUploader->processingAsError($datasource, $options, $dbspecification, $debug);
} else {
$fileUploader->processing($datasource, $options, $dbspecification, $debug);
}
} else {
if (!isset($_POST['access']) && !isset($_GET['media'])) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
} else {
$dbInstance = new DB_Proxy();
$dbInstance->initialize($datasource, $options, $dbspecification, $debug);
$util = new IMUtil();
if ($util->protectCSRF() === TRUE) {
$dbInstance->processingRequest();
$dbInstance->finishCommunication(false);
} else {
$dbInstance->addOutputData('debugMessages', 'Invalid Request Error.');
$dbInstance->addOutputData('errorMessages', array('Invalid Request Error.'));
}
$dbInstance->exportOutputDataAsJSON();
}
}
}
}
}
}
示例2: IM_Entry
function IM_Entry($datasource, $options, $dbspecification, $debug = false)
{
global $g_dbInstance, $g_serverSideCall;
spl_autoload_register('loadClass');
// check required PHP extensions
$requiredFunctions = array('mbstring' => 'mb_internal_encoding');
if (isset($options) && is_array($options)) {
foreach ($options as $key => $option) {
if ($key == 'authentication' && isset($option['user']) && is_array($option['user']) && array_search('database_native', $option['user']) !== false) {
// Native Authentication requires BC Math functions
$requiredFunctions = array_merge($requiredFunctions, array('bcmath' => 'bcadd'));
break;
}
}
}
foreach ($requiredFunctions as $key => $value) {
if (!function_exists($value)) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
$generator->generateErrorMessageJS("PHP extension \"" . $key . "\" is required for running INTER-Mediator.");
return;
}
}
if ($debug) {
$dc = new DefinitionChecker();
$defErrorMessage = $dc->checkDefinitions($datasource, $options, $dbspecification);
if (strlen($defErrorMessage) > 0) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
$generator->generateErrorMessageJS($defErrorMessage);
return;
}
}
if (isset($g_serverSideCall) && $g_serverSideCall) {
$dbInstance = new DB_Proxy();
$dbInstance->initialize($datasource, $options, $dbspecification, $debug);
$dbInstance->processingRequest($options, "NON");
$g_dbInstance = $dbInstance;
} else {
if (!isset($_POST['access']) && isset($_GET['uploadprocess'])) {
$fileUploader = new FileUploader();
$fileUploader->processInfo();
} else {
if (!isset($_POST['access']) && isset($_GET['media'])) {
$dbProxyInstance = new DB_Proxy();
$dbProxyInstance->initialize($datasource, $options, $dbspecification, $debug);
$mediaHandler = new MediaAccess();
if (isset($_GET['attach'])) {
$mediaHandler->asAttachment();
}
$mediaHandler->processing($dbProxyInstance, $options, $_GET['media']);
} else {
if (isset($_POST['access']) && $_POST['access'] == 'uploadfile' || isset($_GET['access']) && $_GET['access'] == 'uploadfile') {
$fileUploader = new FileUploader();
$fileUploader->processing($datasource, $options, $dbspecification, $debug);
} else {
if (!isset($_POST['access']) && !isset($_GET['media'])) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
} else {
$dbInstance = new DB_Proxy();
$dbInstance->initialize($datasource, $options, $dbspecification, $debug);
if ($_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest') {
$dbInstance->processingRequest($options);
$dbInstance->finishCommunication(false);
} else {
$dbInstance->addOutputData('debugMessages', 'Invalid Request Error.');
$dbInstance->addOutputData('errorMessages', array('Invalid Request Error.'));
}
$dbInstance->exportOutputDataAsJSON();
}
}
}
}
}
}
示例3: IM_Entry
function IM_Entry($datasource, $options, $dbspecification, $debug = false)
{
global $g_dbInstance, $g_serverSideCall;
spl_autoload_register('loadClass');
// check required PHP extensions
$requiredFunctions = array('mbstring' => 'mb_internal_encoding');
foreach ($requiredFunctions as $key => $value) {
if (!function_exists($value)) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
$generator->generateErrorMessageJS("PHP extension \"" . $key . "\" is required for running INTER-Mediator.");
return;
}
}
if ($debug) {
$dc = new DefinitionChecker();
$defErrorMessage = $dc->checkDefinitions($datasource, $options, $dbspecification);
if (strlen($defErrorMessage) > 0) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
$generator->generateErrorMessageJS($defErrorMessage);
return;
}
}
if (isset($g_serverSideCall) && $g_serverSideCall) {
$dbInstance = new DB_Proxy();
$dbInstance->initialize($datasource, $options, $dbspecification, $debug);
$dbInstance->processingRequest($options, "NON");
$g_dbInstance = $dbInstance;
} else {
if (!isset($_POST['access']) && isset($_GET['uploadprocess'])) {
$fileUploader = new FileUploader();
$fileUploader->processInfo();
} else {
if (!isset($_POST['access']) && isset($_GET['media'])) {
$dbProxyInstance = new DB_Proxy();
$dbProxyInstance->initialize($datasource, $options, $dbspecification, $debug);
$mediaHandler = new MediaAccess();
if (isset($_GET['attach'])) {
$mediaHandler->asAttachment();
}
$mediaHandler->processing($dbProxyInstance, $options, $_GET['media']);
} else {
if (isset($_POST['access']) && $_POST['access'] == 'uploadfile' || isset($_GET['access']) && $_GET['access'] == 'uploadfile') {
$fileUploader = new FileUploader();
$fileUploader->processing($datasource, $options, $dbspecification, $debug);
} else {
if (!isset($_POST['access']) && !isset($_GET['media'])) {
$generator = new GenerateJSCode();
$generator->generateInitialJSCode($datasource, $options, $dbspecification, $debug);
} else {
$dbInstance = new DB_Proxy();
$dbInstance->initialize($datasource, $options, $dbspecification, $debug);
$dbInstance->processingRequest($options);
$dbInstance->finishCommunication(false);
}
}
}
}
}
}