----- Original Message ----- From: "Erick Papadakis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 11, 2001 9:05 PM Subject: Re: [PHP] problem with include/require > Hi Yasuo, > > Thanks for the reply, but yes I do know that the include_path in php.ini > should have the entries. But is this something new? I want to know how to > allow including and requiring files just like we used to do in PHP3! > > For instance, let us say that we have two software programs on the server > which are completely unrelated (I use Windows platform, so here it is): > > c:\apache\htdocs\software1\includes > c:\apache\htdocs\software2\includes > > Now with the latest PHP I have to include both these above paths in my > PHP.INI's "include_path" directive. is there a way to avoid this, and only > include the "c:\apache\htdocs"? Hmm. I can put multiple includes directory on my system (PHP4.0.4pl1/Linux/Apache) include_path = /home/httpd/include1:/home/httpd/include2 Getting rid of spaces around "=" might help. (It should work with spaces/tab, though) > Yes, I know that I can make a common INCLUDES folder, but come on lets be > practical. It is a lot cleaner if we can have an include folder INSIDE the > software-specific folder. I have different approch for 2 reasons 1) Multiple include path may result in unintetional includes of files. For example, include_for_aap1.inc and include_for_app2.inc may mixed up easily. 2) Multiple include path sacrifices performance. System need to search all include path for files to be included. Therefore, I specify only 1 directory for include_path. I have global.app_name.inc for each apps and defines constant, like define('INCLUDE_PATH','/home/httpd/include_path_for_app1'); and I write include_once(INCLUDE_PATH.'file_to_include.inc'); for all other files to be included. This this method, you still can esiliy change include_path esily and you can have different include directory for each application AND save COU time to find files to include. This is my approch for inlucding files. > Any ideas would be greatly appreciated! > > Thanks/Erick > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.237 / Virus Database: 115 - Release Date: 07-Mar-01 > Yasuo Ohgaki == PHP and Related Resources == [PHP FAQ] http://www.php.net/FAQ.php [PHP Manual] http://www.php.net/manual/en/ [W3C] http://www.w3.org/ [RFCs] http://www.faqs.org/rfcs/ If you don't read standard definitions, I recommend to read them. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to