1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
From: James Valleroy <jvalleroy@mailbox.org>
Date: Tue, 16 Jun 2020 13:20:06 -0400
Subject: example: Use installed autoloader
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Forwarded: not-needed
---
example/README.md | 14 +++-----------
example/index.php | 2 +-
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/example/README.md b/example/README.md
index e4fb359..93e9a1e 100644
--- a/example/README.md
+++ b/example/README.md
@@ -1,19 +1,11 @@
# Slim example
-1. Install composer
+1. Run php server
```text
- $ cd Slim
- $ composer install
+ $ php -S localhost:8888 -t example /usr/share/doc/php-slim/examples/index.php
```
-2. Run php server
-
- ```text
- $ cd Slim
- $ php -S localhost:8888 -t example example/index.php
- ```
-
-3. Open browser
+2. Open browser
Open http://localhost:8888 in your browser and you will see 'Welcome to Slim!'
diff --git a/example/index.php b/example/index.php
index ef895f8..508027d 100644
--- a/example/index.php
+++ b/example/index.php
@@ -6,7 +6,7 @@
* If you are not using Composer, you need to load Slim Framework with your own
* PSR-4 autoloader.
*/
-require 'vendor/autoload.php';
+require 'Slim/autoload.php';
/**
* Step 2: Instantiate a Slim application
|