note 29163 added to function.include
| From: | steve at bstoke dot co dot uk | Date: | Tue, 04 Feb 2003 21:13:00 +0000 |
| Subject: | note 29163 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43413@lists.php.net to get a copy of this message | ||
Ok I got a question that someone may know the answer, I cant stop calls with fopen as some sites
require that on the server, and I want to include a global.php file ( holds special functions for
program to work, like a license key) for say a shopping cart, but if the site owner takes the cart
to another server, they cant use it as the global.php file is not with it.
Now any site on the server can use the file a typical call like
include("../../../../../cart/global.php");
which works fine,
but if they do this they can get the contents of the file, so defeats the license idea
$fp = fopen("../../../../../cart/global.php", "r");
while (! feof( $fp ) ){
$line = fgets( $fp, 1024 );
print "$line <br>";
}
fclose($fp);
I also cant turn on safe mode because of a gallery script that is used will not work, hence why
I'm stuck,
all or any ideas would be appriciated
thanx
--
http://www.php.net/manual/en/function.include.php
http://master.php.net/manage/user-notes.php?action=edit+29163
http://master.php.net/manage/user-notes.php?action=delete+29163
http://master.php.net/manage/user-notes.php?action=reject+29163