Download the PHP package stateless/cms without Composer
On this page you can find all versions of the php package stateless/cms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stateless/cms
More information about stateless/cms
Files in stateless/cms
Informations about the package cms
StatelessCMS
Object-oriented PHP building-blocks for websites and webapps.
Introduction
StatelessCMS is a headless PHP framework designed for creating database-driven PHP applications, "headless" meaning there is no existing front-end. StatelessCMS isn't an app or a CMS itself - it just gives you the building blocks to create one yourself.
Installation
Minimum Requirements
Get a server running PHP 7.0 and a SQL database. Note that apache is recommended, as Request::getHeaders() and Request::getToken() rely on apache_get_headers() as of v0.0.3
Composer Install
The easiest way to install StatelessCMS is to install with Composer:
Web Download
Download the latest release from https://github.com/StatelessSoftware/StatelessCMS/releases.
Development
If you would like the live development branch instead, download or clone from github. https://github.com/StatelessSoftware/StatelessCMS.git
Setting up your first project
Although you are free to use any directory structure you choose, the common basic structure for StatelessCMS is as follows. Don't worry too much about the specifics - we'll create each part step by step.
If you didn't already, install StatelessCMS to vendor/stateless (follow installation instructions above)
Getting started
Open public/index.php. Insert the following code:
If you downloaded and installed StatelessCMS without using Composer, change ../vendor/autoload.php to your StatelessCMS.php file
About public/index.php
This file is the entry point, meaning it is the start of the program. For now, we will use it to show our examples. Later, we can use it to startup our application.
Test
Open a browser and navigate to localhost/public/ You should see Home.
Configuring your server
Ensure your httpd document root is set to public/ Now navigate to localhost/ and you should see Home
Enable mod_rewrite (Clean URLs)
- In a directory block for
public
, setAllowOverride All
- Copy the following htaccess file to public/.htaccess
You may need to install mod_rewrite
Several pages
Now we will create additional pages with clean urls. Replace index.php
with the following code
Load up localhost/about
in your browser, you should see "Read all about us!"