note 15168 added to function.die

From: Date: Thu, 30 Aug 2001 11:18:05 +0000
Subject: note 15168 added to function.die
Groups: php.notes 
Request: Send a blank email to php-notes+get-17379@lists.php.net to get a copy of this message
I've a similar problem to the die() command. I've several .inc.php in a directory named templates/ witch are suposted to be called form the main index.php. I want to display a message when someones call one file in the template directory. like: (header.inc.php) <? if (basaname($PHP_SELF) == "header.inc.php") { die( "Cannot run this script directly"); } ?> <HTML><BODY...... What happens is that the scripts it prints with de message and de HTML. I just want de message http://www.php.net/manual/en/function.die.php

« previous php.notes (#17379) next »