目前我正在使用ubuntu,我想在我的系统中安装PHP Slim framework
。超薄框架无法正常工作
我已经通过命令行安装了composer,并且还手动安装了Slim框架,然后我在slim文件夹中创建了一个index.php文件,并将下面的代码放在该文件中,并且当我尝试运行该文件时看不到。
<?php
require 'vendor/autoload.php';
$app = new SlimApp();
//slim application routes
$app->get('/', function ($request, $response, $args) {
$response->write("Welcome: This is AlphansoTech Tutorial Guide");
return $response;
});
$app->run()
?>
我试图拨打http://localhost/slim/index.php
,显示我空白屏幕。
我不知道第一次发生什么事我正在安装和使用苗条框架。
我试过下面的url来安装slim框架。
http://www.alphansotech.com/blogs/php-restful-api-framework-slim-tutorial/
https://www.slimframework.com/docs/tutorial/first-app.html
https://www.slimframework.com/docs/start/installation.html
如何安装或使用超薄框架上运行的API?
您是否检查安装指南? https://www.slimframework.com/docs/start/installation.html –