# gobang **Repository Path**: FinalYu/gobang ## Basic Information - **Project Name**: gobang - **Description**: 完完全全的从0到1搭建,后台用ThinkPHP6搭建,前台使用vue3搭建,Socket使用Workerman来对接 - **Primary Language**: PHP - **License**: Artistic-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 2 - **Created**: 2024-05-30 - **Last Updated**: 2025-06-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: WorkerMan, PHP, MySQL, Redis, Nginx ## README GoBang 五子棋项目 =============== > 运行环境要求PHP7.4+ 环境版本 ====== * Composer 2.7.2 * PHP 7.4+ * Mysql 5.7 技术栈 ======= * PHP * MySQL * Redis * WorkerMan * ThinkPHP 安装依赖包 ========= ```sh composer install ``` 注意事项 ========= ## 1. 忽略文件 * `app`文件夹下的三个文件`common.php` `config.php` `function.php` * `config`文件夹下的`common.php` * `socket/config`文件夹下`config.php` * `.env`配置文件 * [点击下载](https://pan.baidu.com/s/1sgdk1YaRrIU6pXDsw9_l8g?pwd=fina) > Tips:一般只需要修改`/app/config.php`和`.env`即可 ## 2. 第一次配置 请修改`/app/config.php`文件里面的域名配置,必须要配置本地静态域名,不然登录时会不正常 配置静态域名需要配置跨域,静态域名需配置在static文件夹下 ~~~ location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '指定域名'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Content-Type'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Length' 0; add_header 'Content-Type' 'text/plain charset=UTF-8'; return 204; } add_header 'Access-Control-Allow-Origin' '指定域名'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Content-Type'; } ~~~