note 37581 added to function.include
| From: | alien3d at lycos dot co dot uk | Date: | Thu, 20 Nov 2003 05:04:24 +0000 |
| Subject: | note 37581 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60662@lists.php.net to get a copy of this message | ||
It would not work
<? include("./css/default.css"); ?>
Is this the right code
$path = 'include/';
$extension = '.php';
$filename="connection";
if ( preg_match("#^[a-z0-9_]+$#i",$page) ){
$filename = $path.$page.$extension;
include($filename);
}
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37581
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37581&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37581&report=yes
Search -- http://master.php.net/manage/user-notes.php