PHP code example of showx / phpshow

1. Go to this page and download the library: Download showx/phpshow library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

showx / phpshow example snippets


return [
    //框架里的模式 [0普通启动|1 workerman模式];
    'type' => 1,
    // 绑定的地址
    'host' => '0.0.0.0',
	// 启动的端口
    'port' => 8080,
	//进程worker数量
    'count' => 4,
    //数据库池的数量
    'mysql_pool_num' => 6,
    //调试模式
    'debug' => 1,
    //开发模式 [dev 查看加载异常|dev2 查看接口使用内存等]
    'dev' => 1,
    'dev2' => 0,
];
 
server{
    ...
	location / {
		if ( !-e $request_filename) {
			rewrite ^(.*)$ /index.php?s=/$1 last;
			break;
		}
		try_files $uri $uri/ /index.html;
	}
	location ~ [^/]\.php(/|$) {
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		

├── config 配置目录
│   ├── cron.php
│   ├── db.php
│   ├── signkey.php
│   └── site.php
├── control 控制类
│   ├── IndexController.php
├── index.php   程序入口
├── model 模型类
│   ├── IndexModel.php
├── public 静态文件目录
│   ├── favicon.ico
│   ├── index.html
│   ├── index.php   普通模式下的入口
│   └── robots.txt
├── runtime  临时缓存与日志目录
│   └── Log
└── view  模板目录
    ├── footer.php
    ├── header.php
    ├── index.php