# 短链接生成器 **Repository Path**: cyj0/short ## Basic Information - **Project Name**: 短链接生成器 - **Description**: 支持自定义短码 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: https://so.iarc.top - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-06-17 - **Last Updated**: 2024-02-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 短链接生成 在线演示: [so.iarc.top](http://so.iarc.top) 又一个基于 PHP 简单实现的短链接在线生成工具,简单配置,快速搭建。 ![截图](https://cdn.jsdelivr.net/gh/QingDi2/iarcfile/uploads/2023/06/17/1686989483.png) ## 配置 ### 安装 #### 1. 下载源码,部署至服务器,环境 `PHP >= 5.6`,需安装 `PDO` 扩展。 #### 2. 配置 Nginx,参考如下: ```conf server { listen 80; server_name so.iarc.top; root /www/so.iarc.top; index index.php index.html index.htm; # 伪静态 必须 location / { try_files $uri $uri/ /index.php?$query_string; } # sqlite 数据库文件禁止访问 必须 location ~ /(data\.db) { deny all; } location ~ \.php$ { fastcgi_pass unix:/dev/shm/php-cgi.sock; include fastcgi-php.conf; include fastcgi_params; } } ``` #### 3. 配置数据库,支持 MySQL 和 SQLite。 ##### 3.1 MySQL 配置 ###### 3.1.1 编辑 index.php ```