Giter Site home page Giter Site logo

Comments (6)

joanhey avatar joanhey commented on June 18, 2024

Looks like you are using a Front Controller (index.php).

Here are some examples:
https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/PHP/php-ngx/deploy

There a lot of ways to do it.

I'll create an example for a Front Controller (when I have free time)

from ngx-php.

roukmoute avatar roukmoute commented on June 18, 2024

It is a Front Controller that is used to take any "route" and redirect it to index.php, and currently I don't know how to do it.

For example, how concatenate index.php with its optionnal GET arguments?

I know the repository you sent me, but this is perfect example of non applicable because all routes is hard coded.

from ngx-php.

rryqszq4 avatar rryqszq4 commented on June 18, 2024

@roukmoute It's route anything.

server {
    listen 80;
    server_name localhost;
    access_log logs/cp-stats-web.access.log ;
    root /home/mbxps/mbxps/develop/quanzhao/production/cp-stats-web/public;
    index index.php index.html index.htm;

    location = /favicon.ico {

    }

    location ~ ^/(echarts|antv|jquery|jqueryui|d3|nvd3|semantic|bootstrap|static)/ {
        }

    location ~ /clf {
        proxy_pass http://10.16.172.70:8888;
    }

    location ~ ^(.*)$ {
        content_by_php '
                global $START_TIME;
                $START_TIME = microtime(true);

                if (!defined("APPLICATION_PATH")){
                        define("APPLICATION_PATH", "/home/mbxps/mbxps/develop/quanzhao/production/cp-stats-web");
                }

                require_once(APPLICATION_PATH."/vendor/autoload.php");

                require_once(APPLICATION_PATH."/framework/Dispatch.php");

                $application = new Dispatch();
                $application->run();
        ';
    }
}

from ngx-php.

joanhey avatar joanhey commented on June 18, 2024

Also I'm finishing and adapter for Ngx-php to use any php app, without touch 1 line of code.

I made it first for Workerman https://github.com/joanhey/AdapterMan

from ngx-php.

joanhey avatar joanhey commented on June 18, 2024

@rryqszq4 My email, I want to contact you.
[email protected]

from ngx-php.

rryqszq4 avatar rryqszq4 commented on June 18, 2024

@rryqszq4 My email, I want to contact you. [email protected]

@joanhey My email is [email protected]

from ngx-php.

Related Issues (20)

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.