note 29163 rejected from function.include by nicos

From: Date: Wed, 05 Feb 2003 02:07:26 +0000
Subject: note 29163 rejected from function.include by nicos
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-43432@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

« previous php.notes (#43432) next »