include_path optional

From: Date: Thu, 01 Feb 2001 18:13:47 +0000
Subject: include_path optional
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-31@lists.php.net to get a copy of this message
Monte, One of the limitations I find with using the include_path in the php.ini file is that it assumes something about the web server (i.e. that you have access to php.ini to begin with). Just a suggestion: it would be nice to have the paths part of the smarty class. The class variables allow you to set relative paths or absolute paths, but even then, the include_path must be set since the compiled template assumes that any file to be included will be in the path. Just a suggestion since as we trying to integrate Smarty into phpShop. I am working on this now and will have a solution but tailored to the phpShop environment most likely. Just thought I would share this with you in case you would like to make it a standard feature of Smarty. I am looking at the sample template where the compiled output looks like this: <?php if (!class_exists('Config_File')) include_once 'Config_File.class.php'; if (!is_object($_conf_obj) || get_class($_conf_obj) != 'config_file') { $_conf_obj = new Config_File('/source/phpshop-core/smarty/configs'); The "include_once" statement is the one that is giving me trouble since I would really like it to us the full path that I specified in the smarty class instead of just simply giving the file name. Where can I find the code that creates this output part of the output? Cheers, Pablo

« previous php.smarty.general (#31) next »