📄 fileupload.lib.php
字号:
<?php/*============================================================================== Dokeos - elearning and course management software Copyright (c) 2004 Dokeos S.A. Copyright (c) 2003 Ghent University (UGent) Copyright (c) 2001 Universite catholique de Louvain (UCL) Copyright (c) various contributors For a full list of contributors, see "credits.txt". The full license can be read in "license.txt". This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the GNU General Public License for more details. Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com==============================================================================*//**============================================================================== FILE UPLOAD LIBRARY* This is the file upload library for Dokeos.* Include/require it in your code to use its functionality.** @package dokeos.library* @todo test and reorganise==============================================================================*//*==============================================================================List of functionsreplace_dangerous_char($filename, $strict = 'loose')function php2phps ($fileName)function htaccess2txt($filename)function disable_dangerous_file($filename)function unique_name($path,$name)function get_document_title($name)function process_uploaded_file($uploaded_file)function handle_uploaded_document($_course,$uploaded_file,$base_work_dir,$upload_path,$user_id,$to_group_id,$to_user_id,$maxFilledSpace,$unzip=0,$what_if_file_exists='')function enough_size($fileSize, $dir, $maxDirSpace) //depreciatedfunction enough_space($file_size, $max_dir_space)function dir_total_space($dirPath) //depreciatedfunction documents_total_space()function add_ext_on_mime($fileName,$fileType)function treat_uploaded_file($uploadedFile, $baseWorkDir, $uploadPath, $maxFilledSpace, $uncompress= '') //depreciatedfunction unzip_uploaded_file($uploaded_file, $upload_path, $base_work_dir, $max_filled_space)function clean_up_files_in_zip($p_event, &$p_header)function clean_up_path(&$path)function add_document($_course,$path,$filetype,$filesize,$title)function update_existing_document($_course,$document_id,$filesize)function item_property_update_on_folder($_course,$path,$user_id)function get_levels($filename)function set_default_settings($upload_path,$filename,$filetype="file")function search_img_from_html($htmlFile)function create_unexisting_directory($_course,$user_id,$base_work_dir,$desired_dir_name)function move_uploaded_file_collection_into_directory($_course, $uploaded_file_collection, $base_work_dir, $missing_files_dir,$user_id,$max_filled_space)function replace_img_path_in_html_file($originalImgPath, $newImgPath, $htmlFile)function create_link_file($filePath, $url)function api_replace_links_in_html($upload_path, $full_file_name)function api_replace_links_in_string($upload_path, $buffer)function check_for_missing_files($file)function build_missing_files_form($missing_files,$upload_path,$file_name) Still experimental:function api_replace_parameter($upload_path, $buffer, $param_name="src")==============================================================================*//** * replaces "forbidden" characters in a filename string * * @author - Hugues Peeters <peeters@ipm.ucl.ac.be> * @author - Ren锟
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -