note 11832 modified in function.class-exists by vrana

From: Date: Tue, 17 Aug 2004 14:55:03 +0000
Subject: note 11832 modified in function.class-exists by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79808@lists.php.net to get a copy of this message
Multiple inclusion protection can be achieved in php3 and for non class related code, for example: <?php if(!defined("_SOME_UNIQUE_CONSTANT_")) { define("_SOME_UNIQUE_CONSTANT_",TRUE); // Your protected code here } ?> Make sure that you use a different constant for each protected piece of code. Generally this is used on a file per file basis. Just #ifndef in C! --was-- Multiple inclusion protection can be achieved in php3 and for non class related code, for example: if(!defined("_SOME_UNIQUE_CONSTANT_")) { define("_SOME_UNIQUE_CONSTANT_",TRUE); // Your protected code here } Make sure that you use a different constant for each protected piece of code. Generally this is used on a file per file basis. Just #ifndef in C! http://php.net/manual/en/function.class-exists.php

« previous php.notes (#79808) next »