Download the PHP package vtardia/simphle without Composer
On this page you can find all versions of the php package vtardia/simphle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package simphle
Simphle - Quick PHP Development Server
Simphle is a friendly wrapper for PHP built-in web server, with some handy features for an easy developement.
Requirements
- PHP 5.4 or above with built-in webserver and HTTP extension
- The Symphony Process Component
Installation
-
Composer
Use the
globaloption to install it globally on your system -
Custom
Clone this repository to a shared directory, for example
/usr/local/php/simphleor/Users/Shared/php/Simphleon a Mac, then runcomposer install.Add the
bindirectory to your local path or create a link to thebin/simphleexecutable:
Usage
Basic
Start a server with default settings in the current directory:
Intermediate
Start a server with custom settings from the command line:
Advanced
Create a server.json file in your project's directory with your custom settings and then launch simphle from inside that path.
The router and ini file paths are relative to the current working directory. The main Simphle script searches for these files in the current working directory first, then in Simphle's share directory. The .php and .ini extensions are not required for preset router and INI files.
The controller file path is relative to the document root directory.
Launch it with Composer
Create a scripts section in you composer.json:
Then launch it using
The default router
Simphle's default router tries to simulate a typical Apache .htaccess file:
If the requested URI exists tries to fetch it, if not it searches for an index.php, finally falls back to a "404 not found" error.
Using a front controller
By specifying a controller settings Simphle uses this file as rewrite target instead of index.php, so you can use for example app.php.
Customizing the environment
The env section defines environment variables that are passed to the PHP files through the $_ENV superglobal. JSON objects are converted to associative arrays.
Sometimes the $_ENV superglobal is not populated. It depends on the variables_order settings in php.ini:
This setting can be overridden by local htaccess or php.ini files.
License
Simphle is licensed under the MIT License - see the LICENSE file for details