|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Include_path - Can this be changed Dynamicly
I have looked in a number of places and still can not find a way, I'm hoping to have someone smarter than I shed some light on this problem.
|
|
#2
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
|
|
#3
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
No actualy I want to change the value stored in include_path so I can simplify the porting effort for my web sites.
|
|
#4
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
so..
include("$someValue"); ..code to change $someValue am i way off? i can just shut up. |
|
#5
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
Yeah, you should be able to change that with ini_set...try this at top of your scripts:
ini_set('include_path','whatever you want to change it to'); |
|
#6
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
Yes, I'm afraid that I'm not communicating this very well. In the PHP.INI file there is a value called include_path and it is set to some value that in most cases includes '.' so the scripts can file local include files. In my case I would like to dynamicly change the value of that. so I can avoid errors like the one below. I could change every one of the include statements to be a full path but... I'd rather not go way if I can change this script to script.
Kevin Warning: Failed opening 'foo.php' for inclusion (include_path='.:/php/includes:/usr/share/php:/usr/share/pear') in .... |
|
#7
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
The ini_set lets you change it on a script per script basis.....
|
|
#8
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
The alternative is to provide the full or relative path to the file. Then php wont even use the include_path setting.
The other thing you need to be aware of when using the ini_set fix is to make sure that it is called once somewhere before you include the file. This goes for every script you are running. |
|
#9
|
|||
|
|||
|
RE: Include_path - Can this be changed Dynamicly
Thankyou ... ini_set is exactly what I need. That will make my task much easier!!!
Kevin B |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Include_path - Can this be changed Dynamicly |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|