Skip to content

Commit 5b3c070

Browse files
committed
Fix siler-0.6 code
Add pages/hello.php as something like controller
1 parent 2bf677b commit 5b3c070

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

siler-0.6/index.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
require 'vendor/autoload.php';
3+
require __DIR__.'/vendor/autoload.php';
44

5-
Siler\Route\get('/hello/index', function () {
6-
echo 'Hello World!';
7-
});
5+
Siler\Route\get('/hello/index', './pages/hello.php');
86

97
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';

siler-0.6/pages/hello.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
echo 'Hello World';

0 commit comments

Comments
 (0)