Code Monkey home page Code Monkey logo

game's Introduction

game

棋牌游戏项目

目录结构

websocket --> websocket通信系统

web --> 网站系统

web系统

采用phalcon框架搭建,运行系统得安装phalcon扩展库。

配置站点

web/public/index.php为网站的统一入口,public文件夹作为站点对外开放访问的根目录。根据phalcon框架配置访问重写到index.php,访问路径转变为_url参数。nginx配置样例如下:


server{
	root /data/github/game/web/public/;
	listen 80;
	server_name local.game.com;
	index index.html index.htm index.php;
	location / {
		if (!-e $request_filename){
			rewrite ^/(.*)$ /index.php?_url=/$1 last;
			break;
		}
		expires -1;
	}

	location ~* ^.+\.(jpg|png|gif|js|css|xml|json|swf|ico)$ {
		expires max;
	}

	location ~ \.php$ {
    	fastcgi_pass   127.0.0.1:9000;
	    fastcgi_intercept_errors on;
	    fastcgi_index  index.php;
	    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
	    include        /usr/local/etc/nginx/fastcgi_params;
    }
}

Core

核心基类文件都放在web/app/core/目录下,主要有控制器基类controller、路由声明类Router...

Controller

Controller基类,作为所有控制器的基类。内部统一了公共方法,用于获取登陆用户、返回数据等。具体方法请参考文件内部代码。

Router

Router类,作为所有访问的路有声明类。在其initialize方法中,声明允许访问的路由规则。详情请参考Router内部代码。

websocket系统

采用swoole框架搭建,运行系统得安装swoole扩展库。

game's People

Contributors

huhuaaa avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.