我想知道是否可以创建一个流包装器,以便从数组中加载一些代码,使用类似下面的代码
<?php include 'template://myarraykey/'; ?>
让它像从文件中进行正常包含一样工作吗?问的原因是因为我真的不想在文件系统上存储模板,它们要么存在于memcache中,要么存在于数据库表中,并且不想使用eval().
另外我会假设我需要将allow_url_include设置为on?
php stream include
include ×1
php ×1
stream ×1