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);