Skip to navigation
Setup your own flexible MVC php phalcon application
29.04.17
base phalcon bootstrap file into a directory structure like tutorial/ app/ controllers/ models/ views/ public/ css/ img/ js/ registerDirs( [ "../app/controllers/", "../app/models/", ] ); $loader->register(); // Create a DI $di = new FactoryDefault(); // Setup the view component $di->set( "view", function () { $view = new View(); $view->setViewsDir("../app/views/"); return $view; } ); // Setup a base URI so that all generated URIs include the "tutorial" folder $di->set( "url", function () { $url = new UrlProvider(); $url->setBaseUri("/tutorial/"); return $url; } ); $application = new Application($di); try { // Handle the request $response = $application->handle(); $response->send(); } catch (\Exception $e) { echo "Exception: ", $e->getMessage(); }
https://docs.phalconphp.com/en/latest/reference/tutorial.html
Reply
Anonymous
Information Epoch 1747222438
Small is beautiful.
Home
Notebook
Contact us