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.
以下のコード内で、VARを変数として設定し、それをSimplePieコード内にフィードURLとして含めるにはどうすればよいですか?「フィード」コードは、SimplepiePHPライブラリからのものです。
<?php $VAR = "http://website.com/feed/"; $feed1 = new SimplePie(); $feed1->set_feed_url('$VAR'); $feed1->init(); ?>
シンプルパイについてはよくわかりません。ただし、一重引用符を使用すると、処理されません。二重引用符を試してみてください。引用符は必要ありません。これを試して :
$feed1->set_feed_url($VAR);