note 42180 deleted from faq.html by nlopess

From: Date: Fri, 07 May 2004 12:42:24 +0000
Subject: note 42180 deleted from faq.html by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69312@lists.php.net to get a copy of this message
Note Submitter: Dave ---- 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"; ?>

« previous php.notes (#69312) next »