我正在升级到slim v3。我应该如何使用数据库连接?我在想有疙瘩注射服务: DBConnection的 final class DBConnection {
private $db;
public function __construct() {
try {
// Code to open up a DB connection in $db va
什么是HTTP缓存?我如何在Slim 3中使用它? 但我不太清楚如何this is done in Slim 3: use Slim\Http\Request;
use Slim\Http\Response;
require_once __DIR__ . '/../vendor/autoload.php';
// Register service provider with the co
我知道如何创建一个缓存页面纯PHP,例如, // @ref: http://wesbos.com/simple-php-page-caching-technique/
//
// define the path and name of cached file
$cachefile = 'cache/'.date('M-d-Y').'.php';
// define how long we