1

こんにちは、エピファニー マイクロフレームワークの使用を開始しましたが、簡単な問題が発生しています。ドキュメントに従いましたが、ルートを機能させることができません。これが私のコードです:

include_once 'src/Epi.php';
Epi::init('route');
getRoute()->get('/', 'home');
getRoute()->get('/contact', 'contactUs');
getRoute()->run();

function home() {
    echo 'You are at the home page';
}

function contactUs() {
    echo 'Send us an email at <a href="mailto:foo@bar.com">foo@bar.com</a>';
}

を使用して端末で実行しphp -S localhost:8080ます。入るたびにlocalhost:8080反響し'You are at the home page'ます。しかし、私がやるlocalhost:8080/contactと、まだ反響し'You are at the home page'ます。ドキュメントのすべてに従いました。私は何か間違ったことをしていますか?

4

0 に答える 0