note 42180 added to faq.html

From: Date: Thu, 06 May 2004 14:34:06 +0000
Subject: note 42180 added to faq.html
Groups: php.notes 
Request: Send a blank email to php-notes+get-69281@lists.php.net to get a copy of this message
Here's a neat way to let the user know that they are viewing the web page without PHP installed. We have seen this on occassion because our web pages can be accessed from one of several servers, and even directly from the file server. The trick is to use PHP to output the HTML comment tag (<!-- -->) to disable some inline HTML that tells the user about the problem. If PHP doesn't interprit the script, the script comments will generally not be displayed, and they will see the warning message. Otherwise, the script will disable the warning message. <?PHP // Script stuff here. echo "<!--\n"; ?> <H1>PHP not installed!</H1> We're sorry, you are viewing the web page from a server that doesn't have PHP support installed (or you aren't using a web server at all). This page has PHP script that does something useful, but you can't use it without a PHP-enabled web server. <?PHP echo "-->\n"; ?> ---- Manual Page -- http://www.php.net/manual/en/faq.html.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42180 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42180&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42180&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69281) next »