swoole 可以加速普通 PHP 页面吗?不是 Laravel/tp 那种 di 注入模式的
就是最早的 php + html 嵌套的那种(想要实现 swoole 加速功能)
session_start();
set_time_limit (600);
$a = array(1,2,3,4);
array_unshift($a, "apple", "raspberry");
var_dump($a);
// 当然是有很多页面, 也有数据库等调用
可以用如下方式 加速吗?
ob_start(); // 打开输出控制缓冲
$cont = ob_get_contents(); //
ob_clean();
// 然后 用 swoole 输出吗?
访问路径如: http://localhost/index.php (带有php 文件名, nginx可以伪静态到 swoole 也是可以带有 php 的)
不知道是否可行? swoole 运行时, php 文件会常驻内存, 不需要重新读文件时间了,
就是不知道怎么加速??
PS: swoole
是加载文件到内存,swoole
进程停止才会释放 include
、require
的 php
文件