PHP without a framework: Difference between revisions

From Rixort Wiki
Jump to navigation Jump to search
Line 4: Line 4:


  composer init
  composer init
Create skeleton directory structure:
mkdir public src


Create skeleton front controller at <code>public/index.php</code>
Create skeleton front controller at <code>public/index.php</code>

Revision as of 12:32, 6 March 2021

Instructions

Initialise composer project:

composer init

Create skeleton directory structure:

mkdir public src

Create skeleton front controller at public/index.php

<?php
declare(strict_types=1);

require_once '../vendor/autoload.php';