Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想做这样的事情:
apc_store('apc-$t', $something);
但是在查看缓存时,它会显示“apc-$t”。我真的尝试了所有可能的组合 .'" 和其他东西,但没有成功。这可能吗?
如果您使用单引号,PHP 将不会解释变量。你需要使用:
apc_store("apc-$t", $something);
或者:
apc_store('apc-'.$t, $something);