开发者

How to disable a certain code from another page?

Hello I was wondering how to disable a certain code in a php page using anoth开发者_如何转开发er page, which will have options of enable and disable ? of course temporary disabling, not permanent, so we can enable it later ?

any Ideas about that ?

and thanks :D


Yepp, you can do a call from another page and submit a special parameter which will cause the server to create/change a configuration file on the server. This configuration file needs to get read every time the page is requested. Depending on the configuration a feature of that page will be enabled or disabled.


EDIT: my bad - i thought i read of 2 files, but you were asking for two pages -> nevermind

file a:

   [..]
   define('SHOW_BLOCK', TRUE);
   [..]

file b:

  [..]
  if (SHOW_BLOCK) {
      [..]
  }
  [..]

constants are global

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜