note 21530 added to function.require

From: Date: Thu, 16 May 2002 03:52:18 +0000
Subject: note 21530 added to function.require
Groups: php.notes 
Request: Send a blank email to php-notes+get-30703@lists.php.net to get a copy of this message
make sure that the code in the file which is required is inside <?php ... ?> I had file1.php & file2.php. Three lines were common in those files. I wanted to take these common lines into a file, say xyz.php. I did that, & replaced those 3 lines in file1 & file2 with require('xyz.php') Then the browser displayed those 3 lines from xyz.php instead of evaluating them. It took me 10 mins to figure that those 3 lines should be in a <?php ... ?> small detail - might be useful for someone. -- http://www.php.net/manual/en/function.require.php http://master.php.net/manage/user-notes.php?action=edit+21530 http://master.php.net/manage/user-notes.php?action=delete+21530 http://master.php.net/manage/user-notes.php?action=reject+21530

« previous php.notes (#30703) next »