Merge branch 'qkqpttgf:master' into master
						commit
						af1812971f
					
				
							
								
								
									
										21
									
								
								common.php
								
								
								
								
							
							
						
						
									
										21
									
								
								common.php
								
								
								
								
							| 
						 | 
				
			
			@ -268,7 +268,7 @@ function main($path)
 | 
			
		|||
                return $drive->AddDisk();
 | 
			
		||||
        } else {
 | 
			
		||||
            $url = $_SERVER['PHP_SELF'];
 | 
			
		||||
            if ($_GET) {
 | 
			
		||||
            /*if ($_GET) {
 | 
			
		||||
                $tmp = null;
 | 
			
		||||
                $tmp = '';
 | 
			
		||||
                foreach ($_GET as $k => $v) {
 | 
			
		||||
| 
						 | 
				
			
			@ -279,7 +279,8 @@ function main($path)
 | 
			
		|||
                }
 | 
			
		||||
                $tmp = substr($tmp, 1);
 | 
			
		||||
                if ($tmp!='') $url .= '?' . $tmp;
 | 
			
		||||
            }
 | 
			
		||||
            }*/
 | 
			
		||||
            // not need GET adddisk, remove it
 | 
			
		||||
            return output('<script>alert(\''.getconstStr('SetSecretsFirst').'\');</script>', 302, [ 'Location' => $url ]);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1399,7 +1400,7 @@ output:
 | 
			
		|||
        let inputarea = document.getElementById(\'inputarea\');
 | 
			
		||||
        //console.log(a + ", " + inputarea.value);
 | 
			
		||||
        inputarea.focus();
 | 
			
		||||
        inputarea.setSelectionRange(0, inputarea.value.length);
 | 
			
		||||
        inputarea.setSelectionRange(inputarea.value.length, inputarea.value.length);
 | 
			
		||||
    }, 500);
 | 
			
		||||
</script>';
 | 
			
		||||
        return message($html, 'Run cmd', $statusCode);
 | 
			
		||||
| 
						 | 
				
			
			@ -1923,11 +1924,11 @@ function render_list($path = '', $files = [])
 | 
			
		|||
        return output($htmlcontent['body'], $htmlcontent['stat']);
 | 
			
		||||
    }
 | 
			
		||||
    //$path = str_replace('%20','%2520',$path);
 | 
			
		||||
    $path = str_replace('+','%2B',$path);
 | 
			
		||||
    //$path = str_replace('+','%2B',$path);
 | 
			
		||||
    $path = path_format(urldecode($path));
 | 
			
		||||
    //$path = str_replace('&','&', $path) ;
 | 
			
		||||
    //$path = str_replace('%20',' ',$path);
 | 
			
		||||
    $path = str_replace('#','%23',$path);
 | 
			
		||||
    //$path = str_replace('#','%23',$path);
 | 
			
		||||
    $p_path='';
 | 
			
		||||
    if ($path !== '/') {
 | 
			
		||||
        if ($files['type']=='file') {
 | 
			
		||||
| 
						 | 
				
			
			@ -1961,7 +1962,7 @@ function render_list($path = '', $files = [])
 | 
			
		|||
    }
 | 
			
		||||
    $n_path = str_replace('&','&',$n_path);
 | 
			
		||||
    $p_path = str_replace('&','&',$p_path);
 | 
			
		||||
    $pretitle = str_replace('%23','#',$pretitle);
 | 
			
		||||
    //$pretitle = str_replace('%23','#',$pretitle);
 | 
			
		||||
    $statusCode = 200;
 | 
			
		||||
    date_default_timezone_set(get_timezone($_SERVER['timezone']));
 | 
			
		||||
    $authinfo = '
 | 
			
		||||
| 
						 | 
				
			
			@ -2581,9 +2582,9 @@ function render_list($path = '', $files = [])
 | 
			
		|||
            $tmp_path = str_replace('&','&', substr(urldecode($_SERVER['PHP_SELF']), strlen($tmp_url)));
 | 
			
		||||
            while ($tmp_path!='') {
 | 
			
		||||
                $tmp1 = splitfirst($tmp_path, '/');
 | 
			
		||||
                $folder1 = $tmp1[0];
 | 
			
		||||
                $folder1 = str_replace('&', '&', $tmp1[0]);
 | 
			
		||||
                if ($folder1!='') {
 | 
			
		||||
                    $tmp_url .= str_replace('&', '&', $folder1) . '/';
 | 
			
		||||
                    $tmp_url .= $folder1 . '/';
 | 
			
		||||
                    $PathArrayStr1 = str_replace('<!--PathArrayLink-->', encode_str_replace($folder1==$files['name']?'':$tmp_url), $PathArrayStr);
 | 
			
		||||
                    $PathArrayStr1 = str_replace('<!--PathArrayName-->', $folder1, $PathArrayStr1);
 | 
			
		||||
                    $html .= $PathArrayStr1;
 | 
			
		||||
| 
						 | 
				
			
			@ -2602,9 +2603,9 @@ function render_list($path = '', $files = [])
 | 
			
		|||
            $tmp_path = str_replace('&','&', substr(urldecode($_SERVER['PHP_SELF']), strlen($tmp_url)));
 | 
			
		||||
            while ($tmp_path!='') {
 | 
			
		||||
                $tmp1 = splitfirst($tmp_path, '/');
 | 
			
		||||
                $folder1 = $tmp1[0];
 | 
			
		||||
                $folder1 = str_replace('&', '&', $tmp1[0]);
 | 
			
		||||
                if ($folder1!='') {
 | 
			
		||||
                    $tmp_url .= str_replace('&', '&', $folder1) . '/';
 | 
			
		||||
                    $tmp_url .= $folder1 . '/';
 | 
			
		||||
                    $PathArrayStr1 = str_replace('<!--PathArrayLink-->', encode_str_replace($folder1==$files['name']?'':$tmp_url), $PathArrayStr);
 | 
			
		||||
                    $PathArrayStr1 = str_replace('<!--PathArrayName-->', ($folder1==$_SERVER['disktag']?(getConfig('diskname')==''?$_SERVER['disktag']:getConfig('diskname')):$folder1), $PathArrayStr1);
 | 
			
		||||
                    $html .= $PathArrayStr1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,6 +46,7 @@ function GetPathSetting($event, $context)
 | 
			
		|||
    if ($path=='/'||$path=='') {
 | 
			
		||||
        $_SERVER['base_path'] = $tmp;
 | 
			
		||||
    } else {
 | 
			
		||||
        $tmp = str_replace('&', '&', $tmp);
 | 
			
		||||
        while ($tmp!=urldecode($tmp)) $tmp = urldecode($tmp);
 | 
			
		||||
        $tmp1 = urldecode($event['path']);
 | 
			
		||||
        while ($tmp1!=urldecode($tmp1)) $tmp1 = urldecode($tmp1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										191
									
								
								readme.md
								
								
								
								
							
							
						
						
									
										191
									
								
								readme.md
								
								
								
								
							| 
						 | 
				
			
			@ -1,10 +1,10 @@
 | 
			
		|||
# NOTICE: the release is used as archive. 
 | 
			
		||||
[中文readme](readme_cn.md)  
 | 
			
		||||
 | 
			
		||||
# 注意:release只是用来存档的。
 | 
			
		||||
# NOTICE: 
 | 
			
		||||
 | 
			
		||||
Please read the descriptions of settings before raising an issue.  
 | 
			
		||||
  The release is used as archive.  
 | 
			
		||||
 | 
			
		||||
> 请将设置中所有的设置项的说明都读一遍,有些问题就不用问了。  
 | 
			
		||||
  Please read the descriptions of settings before raising an issue.  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -12,17 +12,17 @@ Please read the descriptions of settings before raising an issue.
 | 
			
		|||
 | 
			
		||||
### Official
 | 
			
		||||
 | 
			
		||||
	https://heroku.com  
 | 
			
		||||
  https://heroku.com  
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
	https://herooneindex.herokuapp.com/  
 | 
			
		||||
  https://herooneindex.herokuapp.com/  
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
> ~~Click the button [](https://heroku.com/deploy) to Deploy a new app~~(`"We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy."`)  
 | 
			
		||||
>
 | 
			
		||||
> Fork this project, create a heroku app, then turn to Deploy tab, deploy via connect to your github fork.   
 | 
			
		||||
> Star this project, then Fork, create a app in Heroku, then turn to the Deploy tab, "Deployment method" via "Connect GitHub", select your github fork.   
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -30,15 +30,15 @@ Please read the descriptions of settings before raising an issue.
 | 
			
		|||
 | 
			
		||||
### Official
 | 
			
		||||
 | 
			
		||||
	https://glitch.com/  
 | 
			
		||||
  https://glitch.com/  
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
	https://onemanager.glitch.me/  
 | 
			
		||||
  https://onemanager.glitch.me/  
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
	New Project -> Import form Github -> paste "https://github.com/qkqpttgf/OneManager-php", after done, Show -> In a New Window.  
 | 
			
		||||
  [New Project] -> [Import form Github] -> paste "https://github.com/qkqpttgf/OneManager-php" , after done, [Show] -> [In a New Window].  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -46,11 +46,11 @@ Please read the descriptions of settings before raising an issue.
 | 
			
		|||
 | 
			
		||||
### Official
 | 
			
		||||
 | 
			
		||||
	https://vercel.com/  
 | 
			
		||||
  https://vercel.com/  
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
	null
 | 
			
		||||
  https://onemanager-php.vercel.app/  
 | 
			
		||||
 | 
			
		||||
### Notice
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -60,224 +60,147 @@ Please read the descriptions of settings before raising an issue.
 | 
			
		|||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
	https://scfonedrive.github.io/Vercel/Deploy.html .  
 | 
			
		||||
  https://scfonedrive.github.io/Vercel/Deploy.html .  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# Deploy to Tencent Serverless Cloud Function (SCF 腾讯无服务器云函数)  
 | 
			
		||||
# Deploy to Tencent Serverless Cloud Function (SCF)  
 | 
			
		||||
 | 
			
		||||
### Official
 | 
			
		||||
 | 
			
		||||
	https://cloud.tencent.com/product/scf  
 | 
			
		||||
  https://cloud.tencent.com/product/scf  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
	暂无  
 | 
			
		||||
 | 
			
		||||
### 注意事项
 | 
			
		||||
 | 
			
		||||
	SCF新增限制,环境变量整体最大4KB,所以最多添加4个盘。  
 | 
			
		||||
  null  
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
1. 进入函数服务,上方选择地区,然后点击新建。
 | 
			
		||||
 | 
			
		||||
2. 输入函数名称,选择模板函数,在模糊搜索中输入onedrive,大小写随意,选择那个【获取onedrive信息.....】,点下一步,在代码界面不用动,直接点完成。
 | 
			
		||||
 | 
			
		||||
3. 点击触发管理,创建触发器,触发方式改成API网关触发,底下勾选启用集成响应,提交。
 | 
			
		||||
 | 
			
		||||
4. 在触发管理中可以看到一个 访问路径,访问它,开始安装。 
 | 
			
		||||
 | 
			
		||||
    (重点:**勾选集成响应**)  
 | 
			
		||||
 | 
			
		||||
> **添加网盘时,SCF可能会反应不过来,不跳转到微软,导致添加失败,请不要删除这个盘,再添加一次相同标签的盘就可以了。**
 | 
			
		||||
  see CN readme.  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Deploy to Huawei cloud Function Graph (FG 华为云函数工作流)  
 | 
			
		||||
# Deploy to Huawei cloud Function Graph (FG)  
 | 
			
		||||
 | 
			
		||||
### Official
 | 
			
		||||
 | 
			
		||||
	https://console.huaweicloud.com/functiongraph/  
 | 
			
		||||
  https://console.huaweicloud.com/functiongraph/  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
	暂无
 | 
			
		||||
 | 
			
		||||
### 注意事项
 | 
			
		||||
 | 
			
		||||
	FG中,环境变量整体大小为2KB,所以最多添加2个盘(一个onedrive一个aliyundrive)。  
 | 
			
		||||
  null
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
1. 在函数列表,点右边创建函数  
 | 
			
		||||
2. 输入名称,选择运行时语言为PHP7.3,点上传ZIP文件,选择文件,然后点右边的创建函数(这里的ZIP文件不能直接用从Github上下载的ZIP文件,要将它解压后,去掉外层文件夹后,再压缩为ZIP。)  
 | 
			
		||||
3. 创建触发器:选API网关,安全认证选None,后端超时(毫秒)将5000改成30000,上面创建分组一下,其它的点点点  
 | 
			
		||||
4. 访问触发器给的url,开始安装
 | 
			
		||||
5. 在【触发器界面】点【触发器名称】,跳到API网关管理,右边【更多URL】,可以添加自定义域名,自定义域名后发现还是要 xxxx.com/函数名 来访问,点上方的【编辑】,第1页不用改,点【下一步】,**请求Path改成/**,注意匹配模式是前缀匹配,Method为ANY,然后不用点下一步了,点【立即完成】,然后去【发布】生效  
 | 
			
		||||
  see CN readme.  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# Deploy to Aliyun Function Compute (FC 阿里云函数计算)  
 | 
			
		||||
# Deploy to Aliyun Function Compute (FC)  
 | 
			
		||||
 | 
			
		||||
### Official: 
 | 
			
		||||
 | 
			
		||||
	https://fc.console.aliyun.com/  
 | 
			
		||||
  https://fc.console.aliyun.com/  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
	无  
 | 
			
		||||
  null  
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
1. 新建函数 -- HTTP函数  
 | 
			
		||||
2. 运行环境选择php7.2  
 | 
			
		||||
3. 触发器认证方式选择anonymous,请求方式里面,点一下GET,再点一下POST,最终框框里面有这2个  
 | 
			
		||||
4. 上传代码  
 | 
			
		||||
5. 触发器中点进去,找到配置自定义域名,点击前往,创建,路径中填 /* ,其它下拉选择。
 | 
			
		||||
6. 访问你的域名,开始安装  
 | 
			
		||||
  see CN readme.  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# Deploy to Baidu Cloud Function Compute (CFC 百度云函数计算)  
 | 
			
		||||
# Deploy to Baidu Cloud Function Compute (CFC)  
 | 
			
		||||
 | 
			
		||||
### Official
 | 
			
		||||
 | 
			
		||||
	https://console.bce.baidu.com/cfc/#/cfc/functions  
 | 
			
		||||
  https://console.bce.baidu.com/cfc/#/cfc/functions  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
	暂无
 | 
			
		||||
 | 
			
		||||
### 注意事项
 | 
			
		||||
 | 
			
		||||
	**自定义域名需要另外使用API网关,并备案。**
 | 
			
		||||
  null
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
1. 在函数列表,点创建函数  
 | 
			
		||||
2. 创建方式改为空白函数,点下一步  
 | 
			
		||||
  3. 输入名称,选择运行时为PHP7.2,点下一步  
 | 
			
		||||
  4. 触发器:下拉选择HTTP触发器,URL路径填 /{filepath+} ,HTTP方法全选,身份验证:不验证,点提交  
 | 
			
		||||
  5. 进入代码编辑页,编辑类型改上传函数ZIP包,选择文件(这里的ZIP文件不能直接用从Github上下载的ZIP文件,要将它解压后,去掉外层文件夹后,再压缩为ZIP。),开始上传  
 | 
			
		||||
  6. 点击右边触发器,复制并访问提供的url,开始安装  
 | 
			
		||||
  see CN readme.  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Deploy to Virtual Private Server (VPS 或空间)  
 | 
			
		||||
# Deploy to Virtual Private Server (VPS) or php host  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
暂无
 | 
			
		||||
  null
 | 
			
		||||
 | 
			
		||||
### How to Install
 | 
			
		||||
 | 
			
		||||
1. Start web service on your server (httpd or other), make sure you can visit it.  
 | 
			
		||||
 | 
			
		||||
    >启动web服务器,确保你能访问到。  
 | 
			
		||||
 | 
			
		||||
2. Make the rewrite works, the rule is in .htaccess file, make sure any query redirect to index.php.  
 | 
			
		||||
 | 
			
		||||
    >开启伪静态(重写)功能,规则在.htaccess文件中,ngnix从里面复制,我们的目的是不管访问什么都让index.php来处理。  
 | 
			
		||||
 | 
			
		||||
3. Upload code.  
 | 
			
		||||
 | 
			
		||||
    >上传好代码。  
 | 
			
		||||
 | 
			
		||||
4. Change the file .data/config.php can be read&write (666 is suggested).  
 | 
			
		||||
 | 
			
		||||
    >使web身份可读写代码中的.data/config.php文件,推荐chmod 666 .data/config.php。  
 | 
			
		||||
 | 
			
		||||
5. View the website in chrome or other.  
 | 
			
		||||
 | 
			
		||||
    >在浏览器中访问。  
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# Features  
 | 
			
		||||
 | 
			
		||||
  When downloading files, the program produce a direct url, visitor download files from MS OFFICE via the direct url, the server expend a few bandwidth in produce.  
 | 
			
		||||
 | 
			
		||||
  When uploading files, the program produce a direct url, visitor upload files to MS OFFICE via the direct url, the server expend a few bandwidth in produce.  
 | 
			
		||||
 | 
			
		||||
  The XXX_path in setting is the path in Onedrive, not in url, program will find the path in Onedrive.  
 | 
			
		||||
 | 
			
		||||
  LOGO ICON: put your 'favicon.ico' in the path you showed, make sure xxxxx.com/favicon.ico can be visited.   
 | 
			
		||||
 | 
			
		||||
  Program will show content of 'readme.md' & 'head.md'.  
 | 
			
		||||
 | 
			
		||||
  guest upload path, is a folder that the guest can upload files, but can not be list (exclude admin).  
 | 
			
		||||
 | 
			
		||||
  If there is 'index.html' file, program will only show the content of 'index.html', not list the files.  
 | 
			
		||||
 | 
			
		||||
  Click 'EditTime' or 'Size', the list will sort by time or size, Click 'File' can resume sort.  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# Features 特性  
 | 
			
		||||
 | 
			
		||||
	When downloading files, the program produce a direct url, visitor download files from MS OFFICE via the direct url, the server expend a few bandwidth in produce.  
 | 
			
		||||
 | 
			
		||||
> 下载时,由程序解析出直链,浏览器直接从微软Onedrive服务器下载文件,服务器只消耗与微软通信的少量流量。  
 | 
			
		||||
 | 
			
		||||
	When uploading files, the program produce a direct url, visitor upload files to MS OFFICE via the direct url, the server expend a few bandwidth in produce.  
 | 
			
		||||
 | 
			
		||||
> 上传时,由程序生成上传url,浏览器直接向微软Onedrive的这个url上传文件,服务器只消耗与微软通信的少量流量。  
 | 
			
		||||
 | 
			
		||||
	The XXX_path in setting is the path in Onedrive, not in url, program will find the path in Onedrive.  
 | 
			
		||||
 | 
			
		||||
> 设置中的 XXX_path 是Onedrive里面的路径,并不是你url里面的,程序会去你Onedrive里面找这个路径。  
 | 
			
		||||
 | 
			
		||||
	LOGO ICON: put your 'favicon.ico' in the path you showed, make sure xxxxx.com/favicon.ico can be visited.   
 | 
			
		||||
 | 
			
		||||
> 网站图标:将favicon.ico文件放在你要展示的目录中,确保 xxxxx.com/favicon.ico 可以访问到。  
 | 
			
		||||
 | 
			
		||||
	Program will show content of 'readme.md' & 'head.md'.  
 | 
			
		||||
 | 
			
		||||
> 可以在文件列表显示head.md跟readme.md文件的内容。  
 | 
			
		||||
 | 
			
		||||
	guest up path, is a folder that the guest can upload files, but can not be list (exclude admin).  
 | 
			
		||||
 | 
			
		||||
> 游客上传目录(也叫图床目录),是指定一个目录,让游客可以上传文件,不限格式,不限大小。这个目录里面的内容不列清单(除非管理登录)。  
 | 
			
		||||
 | 
			
		||||
	If there is 'index.html' file, program will only show the content of 'index.html', not list the files.  
 | 
			
		||||
 | 
			
		||||
> 如果目录中有index.html文件,只会输出显示html文件,不显示程序框架。  
 | 
			
		||||
 | 
			
		||||
	Click 'EditTime' or 'Size', the list will sort by time or size, Click 'File' can resume sort.  
 | 
			
		||||
 | 
			
		||||
> 点击“时间”、“大小”,可以排序显示,点“文件”恢复原样。  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# Functional files 功能性文件
 | 
			
		||||
# Functional files
 | 
			
		||||
 | 
			
		||||
### favicon.ico
 | 
			
		||||
 | 
			
		||||
put it in the showing home folder of FIRST disk (maybe not root of onedrive). 
 | 
			
		||||
 | 
			
		||||
> 放在第一个盘的显示目录(不一定是onedrive根目录)。  
 | 
			
		||||
  put it in the showing home folder of FIRST disk (maybe not root of onedrive). 
 | 
			
		||||
 | 
			
		||||
### index.html
 | 
			
		||||
 | 
			
		||||
show content of index.html as html. 
 | 
			
		||||
 | 
			
		||||
> 将index.html以静态网页显示出来。  
 | 
			
		||||
  show content of index.html as html. 
 | 
			
		||||
 | 
			
		||||
### head.md
 | 
			
		||||
 | 
			
		||||
### readme.md
 | 
			
		||||
 | 
			
		||||
it will showed at top or bottom as markdown.
 | 
			
		||||
 | 
			
		||||
> 以MD语法显示在顶部或底部。  
 | 
			
		||||
  it will showed at top or bottom as markdown.
 | 
			
		||||
 | 
			
		||||
### head.omf
 | 
			
		||||
 | 
			
		||||
### foot.omf
 | 
			
		||||
 | 
			
		||||
it will showed at top or bottom as html (javascript works!). 
 | 
			
		||||
 | 
			
		||||
> 以html显示在顶部或底部(可以跑js)。  
 | 
			
		||||
  it will showed at top or bottom as html (javascript works!). 
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# A cup of coffee
 | 
			
		||||
 | 
			
		||||
https://paypal.me/qkqpttgf  
 | 
			
		||||
  https://paypal.me/qkqpttgf  
 | 
			
		||||
 | 
			
		||||
-----
 | 
			
		||||
 | 
			
		||||
# Chat
 | 
			
		||||
 | 
			
		||||
 **请看完上面的中英双语再加群,谢谢!**  
 | 
			
		||||
 | 
			
		||||
### QQ Group:
 | 
			
		||||
 | 
			
		||||
212088653
 | 
			
		||||
 | 
			
		||||
### Telegram Group
 | 
			
		||||
 | 
			
		||||
https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw  
 | 
			
		||||
  https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw  
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,246 @@
 | 
			
		|||
[Readme EN](readme.md)  
 | 
			
		||||
 | 
			
		||||
# 注意:
 | 
			
		||||
 | 
			
		||||
  release只是当存档用的。  
 | 
			
		||||
 | 
			
		||||
  请将设置中所有的设置项的说明都读一遍,有些问题就不用问了。  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# 部署到 Heroku  
 | 
			
		||||
 | 
			
		||||
### 官网
 | 
			
		||||
 | 
			
		||||
  https://heroku.com  
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
  https://herooneindex.herokuapp.com/  
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
> 给这个项目点star,然后fork,在Heroku创建一个app,然后点进Deploy页,在"Deployment method"处点"Connect GitHub",选择你的fork。   
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# 部署到 Glitch  
 | 
			
		||||
 | 
			
		||||
### 官网
 | 
			
		||||
 | 
			
		||||
  https://glitch.com/  
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
  https://onemanager.glitch.me/  
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
  点 [New Project] -> 点 [Import form Github] -> 粘贴 "https://github.com/qkqpttgf/OneManager-php" ,结束后,左上角点 [Show] -> [In a New Window]。  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# 部署到 Vercel  
 | 
			
		||||
 | 
			
		||||
### 官网
 | 
			
		||||
 | 
			
		||||
  https://vercel.com/  
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
  https://onemanager-php.vercel.app/  
 | 
			
		||||
 | 
			
		||||
### 注意
 | 
			
		||||
 | 
			
		||||
> 1. 每次更改配置后都要等 30-50s 来确保部署成功;  
 | 
			
		||||
>
 | 
			
		||||
> 2. Vercel 每天限制 100 次部署。  
 | 
			
		||||
 | 
			
		||||
### 安装(英文)
 | 
			
		||||
 | 
			
		||||
  https://scfonedrive.github.io/Vercel/Deploy.html   
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# 部署到腾讯无服务器云函数 Serverless Cloud Function (SCF)  
 | 
			
		||||
 | 
			
		||||
### 官网
 | 
			
		||||
 | 
			
		||||
  https://cloud.tencent.com/product/scf  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
  暂无  
 | 
			
		||||
 | 
			
		||||
### 注意事项
 | 
			
		||||
 | 
			
		||||
  SCF新增限制,环境变量整体最大4KB,所以最多添加4个盘(可以在安装时选择将配置保存在文件来避开限制)。  
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
1. 进入函数服务,上方选择地区,然后点击新建。
 | 
			
		||||
 | 
			
		||||
2. 输入函数名称,选择模板函数,在模糊搜索中输入onedrive,大小写随意,选择那个【获取onedrive信息.....】,点下一步,在代码界面不用动,直接点完成。
 | 
			
		||||
 | 
			
		||||
3. 点击触发管理,创建触发器,触发方式改成API网关触发,底下勾选启用集成响应,提交。
 | 
			
		||||
 | 
			
		||||
4. 在触发管理中可以看到一个 访问路径,访问它,开始安装。 
 | 
			
		||||
 | 
			
		||||
    (重点:**勾选集成响应**)  
 | 
			
		||||
 | 
			
		||||
> **添加网盘时,SCF可能会反应不过来,不跳转到微软,导致添加失败,请不要删除这个盘,再添加一次相同标签的盘就可以了。**
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 部署到华为云函数工作流 Function Graph (FG)  
 | 
			
		||||
 | 
			
		||||
### 官网
 | 
			
		||||
 | 
			
		||||
  https://console.huaweicloud.com/functiongraph/  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
  暂无  
 | 
			
		||||
 | 
			
		||||
### 注意事项
 | 
			
		||||
 | 
			
		||||
  FG中,环境变量整体大小为2KB,所以最多添加2个盘(一个onedrive一个aliyundrive)(可以在安装时选择将配置保存在文件来避开限制)。  
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
1. 在函数列表,点右边创建函数  
 | 
			
		||||
2. 输入名称,选择运行时语言为PHP7.3,点上传ZIP文件,选择文件,然后点右边的创建函数(这里的ZIP文件不能直接用从Github上下载的ZIP文件,要将它解压后,去掉外层文件夹后,再压缩为ZIP。)  
 | 
			
		||||
3. 创建触发器:选API网关,安全认证选None,后端超时(毫秒)将5000改成30000,上面创建分组一下,其它的点点点  
 | 
			
		||||
4. 访问触发器给的url,开始安装
 | 
			
		||||
5. 在【触发器界面】点【触发器名称】,跳到API网关管理,右边【更多URL】,可以添加自定义域名,自定义域名后发现还是要 xxxx.com/函数名 来访问,点上方的【编辑】,第1页不用改,点【下一步】,**请求Path改成/**,注意匹配模式是前缀匹配,Method为ANY,然后不用点下一步了,点【立即完成】,然后去【发布】生效  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# 部署到阿里云函数计算 Function Compute (FC)  
 | 
			
		||||
 | 
			
		||||
### 官网 
 | 
			
		||||
 | 
			
		||||
  https://fc.console.aliyun.com/  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
  无  
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
1. 新建函数 -- HTTP函数  
 | 
			
		||||
2. 运行环境选择php7.2  
 | 
			
		||||
3. 触发器认证方式选择anonymous,请求方式里面,点一下GET,再点一下POST,最终框框里面有这2个  
 | 
			
		||||
4. 上传代码  
 | 
			
		||||
5. 触发器中点进去,找到配置自定义域名,点击前往,创建,路径中填 /* ,其它下拉选择。
 | 
			
		||||
6. 访问你的域名,开始安装  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# 部署到百度云函数计算 Cloud Function Compute (CFC)  
 | 
			
		||||
 | 
			
		||||
### 官网
 | 
			
		||||
 | 
			
		||||
  https://console.bce.baidu.com/cfc/#/cfc/functions  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
  暂无  
 | 
			
		||||
 | 
			
		||||
### 注意事项
 | 
			
		||||
 | 
			
		||||
  **自定义域名需要另外使用API网关,并备案。**
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
1. 在函数列表,点创建函数  
 | 
			
		||||
2. 创建方式改为空白函数,点下一步  
 | 
			
		||||
3. 输入名称,选择运行时为PHP7.2,点下一步  
 | 
			
		||||
4. 触发器:下拉选择HTTP触发器,URL路径填 /{filepath+} ,HTTP方法全选,身份验证:不验证,点提交  
 | 
			
		||||
5. 进入代码编辑页,编辑类型改上传函数ZIP包,选择文件(这里的ZIP文件不能直接用从Github上下载的ZIP文件,要将它解压后,去掉外层文件夹后,再压缩为ZIP。),开始上传  
 | 
			
		||||
6. 点击右边触发器,复制并访问提供的url,开始安装  
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
# 部署到VPS (Virtual Private Server) 或 空间  
 | 
			
		||||
 | 
			
		||||
### DEMO
 | 
			
		||||
 | 
			
		||||
暂无
 | 
			
		||||
 | 
			
		||||
### 安装
 | 
			
		||||
 | 
			
		||||
1. 启动web服务器,确保你能访问到。  
 | 
			
		||||
 | 
			
		||||
2. 开启伪静态(重写)功能,规则在.htaccess文件中,ngnix从里面复制,我们的目的是不管访问什么都让index.php来处理。  
 | 
			
		||||
 | 
			
		||||
3. 上传好代码。  
 | 
			
		||||
 | 
			
		||||
4. 使web身份可读写代码中的.data/config.php文件,推荐chmod 666 .data/config.php。  
 | 
			
		||||
 | 
			
		||||
5. 在浏览器中访问。  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# 特性  
 | 
			
		||||
 | 
			
		||||
  下载时,由程序解析出直链,浏览器直接从微软Onedrive服务器下载文件,服务器只消耗与微软通信的少量流量。  
 | 
			
		||||
 | 
			
		||||
  上传时,由程序生成上传url,浏览器直接向微软Onedrive的这个url上传文件,服务器只消耗与微软通信的少量流量。  
 | 
			
		||||
 | 
			
		||||
  设置中的 XXX_path 是Onedrive里面的路径,并不是你url里面的,程序会去你Onedrive里面找这个路径。  
 | 
			
		||||
 | 
			
		||||
  网站图标:将favicon.ico文件放在你要展示的目录中,确保 xxxxx.com/favicon.ico 可以访问到。  
 | 
			
		||||
 | 
			
		||||
  可以在文件列表显示head.md跟readme.md文件的内容。  
 | 
			
		||||
 | 
			
		||||
  游客上传目录(也叫图床目录),是指定一个目录,让游客可以上传文件,不限格式,不限大小。这个目录里面的内容不列清单(除非管理登录)。  
 | 
			
		||||
 | 
			
		||||
  如果目录中有index.html文件,只会输出显示html文件,不显示程序框架。  
 | 
			
		||||
 | 
			
		||||
  点击“时间”、“大小”,可以排序显示,点“文件”恢复原样。  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# 功能性文件
 | 
			
		||||
 | 
			
		||||
### favicon.ico
 | 
			
		||||
 | 
			
		||||
  放在第一个盘的显示目录(不一定是onedrive根目录)。  
 | 
			
		||||
 | 
			
		||||
### index.html
 | 
			
		||||
 | 
			
		||||
  将index.html以静态网页显示出来。  
 | 
			
		||||
 | 
			
		||||
### head.md
 | 
			
		||||
 | 
			
		||||
### readme.md
 | 
			
		||||
 | 
			
		||||
  以MD语法显示在顶部或底部。  
 | 
			
		||||
 | 
			
		||||
### head.omf
 | 
			
		||||
 | 
			
		||||
### foot.omf
 | 
			
		||||
 | 
			
		||||
  以html显示在顶部或底部(可以跑js)。  
 | 
			
		||||
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
# 捐赠
 | 
			
		||||
 | 
			
		||||
  https://paypal.me/qkqpttgf  
 | 
			
		||||
 | 
			
		||||
-----
 | 
			
		||||
 | 
			
		||||
# 群聊
 | 
			
		||||
 | 
			
		||||
  **请看完上面的中英双语再加群,谢谢!**  
 | 
			
		||||
 | 
			
		||||
### QQ 群:
 | 
			
		||||
 | 
			
		||||
  212088653  
 | 
			
		||||
 | 
			
		||||
### Telegram Group
 | 
			
		||||
 | 
			
		||||
  https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw  
 | 
			
		||||
		Loading…
	
		Reference in New Issue