Home  >  Article  >  Backend Development  >  请问:关于判断网站是否关闭

请问:关于判断网站是否关闭

WBOY
WBOYOriginal
2016-06-13 11:07:001357browse

请教:关于判断网站是否关闭
如果网站的服务器需要维护,当网站进行维护时,怎么用代码来判断网站是否在维护,如果在维护的话跳转到提示“服务器正在维护”页面??不甚感激
------解决方案--------------------
在文件或数据库中置一个标识,在网站头部加判断,如果标识为真显示维护状态中。否则正常访问
------解决方案--------------------
a.php





其他php

include a.php
if ($maintance) header(...)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn