note 72269 deleted from function.include by peehaa

From: Date: Fri, 09 Dec 2016 22:52:05 +0000
Subject: note 72269 deleted from function.include by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208395@lists.php.net to get a copy of this message
Note Submitter: vahe dot ayvazyan at googlemail dot com ---- If you want the "include" function to work correctly with paths and GET parameters, try the following code: <?php $_GET['param1'] = 'param1value'; $_GET['param2'] = 'param2value'; @include($_SERVER['DOCUMENT_ROOT'] . "/path1/path2/include.php"); ?> Then within your "include.php" use $_GET['param1'] and $_GET['param2'] to access values of parameters. I spent several hours to figure this out.

« previous php.notes (#208395) next »