SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Include Virtual...
-
Feb 26, 2001, 04:01 #1
- Join Date
- Jan 2001
- Location
- Rawalpindi, Pakistan
- Posts
- 49
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hello,
I have read some of old posts regarding including the files in virtual paths, got 2 answers, one is add entry in php.ini file, and second is through .htaccess, I need details on both accounts, where can I find php.ini, and what shud I write in .htaccess file.
Thanx
Aatif Malik
-
Feb 26, 2001, 06:25 #2
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What exactly do you want to achieve? If you just want to include a fiel then you can stick it in the same directory as the script you wish to include it in and use
PHP Code:include("filename.txt");
-
Feb 26, 2001, 06:35 #3
- Join Date
- Jan 2001
- Location
- Rawalpindi, Pakistan
- Posts
- 49
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
sorry ...
I have header and footer files, I dont want to use different header footer files in different directories, lets say in root directory I'll be using include("header.php"), where in root/first directory I'll be using include("../header.php"), but I want to use same string in all directories, some thing like include virtual in ASP, some body else has asked similar question, thats why I didnt explain,
Thanx
-
Feb 26, 2001, 07:18 #4
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry about that - I didn't read the other thread first. You won't be able to edit the php.ini file unless you arethe server administrator (i.e if you are using a hosting account somewhere it's very unlikely you'll be able to change it) - I'm afraid I haven't the slightest idea if or how you could do it with .htaccess though
-
Feb 26, 2001, 14:31 #5
- Join Date
- Nov 2000
- Location
- Hong Kong
- Posts
- 1,508
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IN htaccess:
php_include_path "/path/to/dir"
Peter
Bookmarks