каталог файлов с делением по категориям и доступом в зависимости от прав. В результате столкнулся с проблемой: НЕ МОГУ ЗАГРУЗИТЬ ФАЙЛ НА СЕРВЕР!
в темплайт добавил код:
Код: Выделить всё
<form action="catalog.php" method="post" enctype="multipart/form-data">
<input type=hidden name=mode value="download_ert">
<input type="file" id="fileert" name="fileert"><br>
<input type="submit" value="Загрузить"><br>
</form>
Код: Выделить всё
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(array('catalogs', 'groups'));
// Grab data
$mode = request_var('mode', '');
switch ($mode)
{
case 'download_ert':
include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
$upload = new fileupload('FERT_', array('ert'), 1024*1*1024, 0, 0, 0, 0, explode('|', $config['mime_triggers']));
if (!empty($_FILES['fileert']['name']))
{
$fileert = $upload->form_upload('fileert');
}
else
{
trigger_error('NO_ERT_FILE');
}
......
$_FILES['fileert']['name'] - при входе в модуль пустое значение, после подключения common.php вообще перестаёт быть массивом
подскажите как что работает c файлами на phpBB3, умаялся уже совсем