本文整理汇总了PHP中fileupload::fileupload方法的典型用法代码示例。如果您正苦于以下问题:PHP fileupload::fileupload方法的具体用法?PHP fileupload::fileupload怎么用?PHP fileupload::fileupload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fileupload
的用法示例。
在下文中一共展示了fileupload::fileupload方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$allowed_extensions = array();
if (phpbb_gallery_config::get('allow_jpg')) {
$allowed_extensions[] = 'jpg';
$allowed_extensions[] = 'jpeg';
}
if (phpbb_gallery_config::get('allow_gif')) {
$allowed_extensions[] = 'gif';
}
if (phpbb_gallery_config::get('allow_png')) {
$allowed_extensions[] = 'png';
}
if (!class_exists('fileupload')) {
phpbb_gallery_url::_include('functions_upload', 'phpbb');
}
$fileupload = new fileupload();
$fileupload->fileupload('', $allowed_extensions, 4 * phpbb_gallery_config::get('max_filesize'));
$upload_image_files = phpbb_gallery::$auth->acl_check('i_unlimited', $album_id, $album_data['album_user_id']) ? phpbb_gallery_config::get('num_uploads') : min(phpbb_gallery::$auth->acl_check('i_count', $album_id, $album_data['album_user_id']) - $own_images, phpbb_gallery_config::get('num_uploads'));
// Get File Upload Info
$image_id_ary = array();
$loop = request_var('image_num', 0);
$rotate = request_var('rotate', array(0));
$loop = $loop != 0 ? $loop - 1 : $loop;
for ($i = 0; $i < $upload_image_files; $i++) {
$image_file = $fileupload->form_upload('image_file_' . $i);
if (!$image_file->uploadname) {
continue;
}
$image_file->clean_filename('unique_ext');
$image_file->move_file(substr(phpbb_gallery_url::path('upload_noroot'), 0, -1), false, false, CHMOD_ALL);
if (sizeof($image_file->error) && $image_file->uploadname) {
$image_file->remove();