Added README file

This commit is contained in:
Jincheng Lu 2022-05-15 20:01:22 +00:00
parent 465f0fef51
commit 2410089da2
2 changed files with 14 additions and 2 deletions

12
README.md Normal file
View File

@ -0,0 +1,12 @@
# Installation
1. First assign the `$share_url` variable with your onedrive share link. example: `$share_url = "<your share link>";`
2. Place index.php file inside the DocumentRoot folder of apache or nginx. Make sure php is enabled..
3. You need to redirect all routes to the index.php file and put the path in a parameter called path.
* If you are using apache, you can add following rewrite rules in your virualhost config file:
---
RewriteEngine on
RewriteRule ^(.*)$ /index.php?path=$1 [PT,L,QSA]
---
* If you are using nginx, please search the equivalent configuration on the internet
---
---

View File

@ -1,5 +1,5 @@
<?php <?php
$share_url = "https://1drv.ms/f/s!AhzmQMxm1n467DZsz0ev8jKEqskE"; $share_url = "";
$path = $_GET['path']; $path = $_GET['path'];
function get_encodedURL($share_url) { function get_encodedURL($share_url) {
@ -76,4 +76,4 @@ if ($result['pathvalid'] && $result['isfolder'] == false) {
// echo "<b>" . substr($path, 1) . "</b> does not exists!"; // echo "<b>" . substr($path, 1) . "</b> does not exists!";
?> ?>
</body> </body>
</html> </html>