Browse Source

Merge pull request #3 from Evertheless/master

Baoshuo Ren 3 years ago
parent
commit
6ab61bb4af
4 changed files with 50 additions and 4 deletions
  1. 44 0
      README.en.md
  2. 4 2
      README.md
  3. BIN
      inc/class/database.db
  4. 2 2
      index.php

+ 44 - 0
README.en.md

@@ -0,0 +1,44 @@
+# ShortLink
+
+[简体中文](./README.md) | **English**
+
+The code is based on secondary development of [CRZ.im](https://github.com/Caringor/CRZ.im), thanks for the hard work of the original author @Caringor!
+
+## Overview
+
+A web URL shortener source code.
+
+## Installation
+
+### Environment
+
++ Compatible with `PHP 7.x`
++ `Nginx 1.15+`
++ ~~`MySQL 5.5+`~~ (Not required for current version)
+
+Suggestion: Please install it on a SSD server if the website will be heavily used.
+
+### Configuration
+
+Modify the settings in `config.php` and change the permissions of the folder `inc` to `755`.
+
+### URL rewrite rules
+
+#### For Apache
+
+Just directly use the file `.htaccess`.
+
+#### For Nginx
+
+Add the content of `nginx-rewrite.conf` to the `Nginx` server block being used.
+
+## Features
+
++ URL shortener
++ Concise page
++ One-click copy
+
+## Todo List
+
++ Add the support of `MySQL`
++ More...

+ 4 - 2
README.md

@@ -1,5 +1,7 @@
 # ShortLink
 
+**简体中文** | [English](./README.en.md)
+
 代码基于 [CRZ.im](https://github.com/Caringor/CRZ.im) 二次开发,感谢原作者的辛勤劳动。
 
 ## 概述
@@ -10,7 +12,7 @@
 
 ### 环境准备
 
-+ `PHP 7.0+`
++ 兼容 PHP 7.x
 + `Nginx 1.15+`
 + ~~`MySQL 5.5+`~~ (目前还不需要)
 
@@ -28,7 +30,7 @@
 
 #### Nginx 用户
 
-需要把 `nginx-rewrite.conf` 里面的内容添加到 `Nginx` 的配置文件里。
+需要把 `nginx-rewrite.conf` 里面的内容添加到 `Nginx` 对欲使用网站的配置文件里。
 
 ## 功能
 

BIN
inc/class/database.db


+ 2 - 2
index.php

@@ -50,7 +50,7 @@
 	    </div>
 		<!--嵌入 JS 代码-->
 		<script>
-			document.body.oncopy = function() {
+			shorturl.oncopy = function() {
 				Swal.fire({
 					allowOutsideClick:false,
 					type:'success',
@@ -65,4 +65,4 @@
 		<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
 	</body>
 	
-</html>
+</html>