The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

3 Pages V < 1 2 3  
Reply to this topicStart new topic
> PHP include function
Dr Z
post Apr 2 2007, 10:30 PM
Post #41


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



Christian, in my posting you have replied, I may have confused you....

When I was reffering to the difference between Apache 2 & Apache 2.2, I was not using PHP at all. The test page I used was strictly an html page with some external Style sheets and some SSI directives. I used the "root directory" as an example, it could be any other directory. The observation was pivoted on the difference between when the files are in different different directories versus the same directory.

For example, the referred file can be /foo directory, or in any directory other than /foo, the path /foo/left.inc will work (both Apache 2 and Apache 2.2). However, when you are in the /foo directory (i.e both files are in the same directory) the difference between paths /foo/left.inc and left.nc becomes observable. Same applies to external style sheets linked to the the page. (i.e if they are in the same directory or in different directories)

I hope I made myself (I doubt it, since I am confused myself).

One further note:
The reason I stepped back to pure html was to identify the abilities/limitations of Apache related directieves (SSI being an inherent part of Apache) and seperate them from those of PHP. In other words, to see if some functionality and/or limitations of Apache and PHP may possibly different, and therefore, hoe these may be be addressed differently dependending on the application.

This post has been edited by Dr Z: Apr 2 2007, 10:42 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 3 2007, 04:32 AM
Post #42


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Dr Z @ Apr 3 2007, 05:30 AM) *

For example, the referred file can be /foo directory, or in any directory other than /foo, the path /foo/left.inc will work (both Apache 2 and Apache 2.2). However, when you are in the /foo directory (i.e both files are in the same directory) the difference between paths /foo/left.inc and left.nc becomes observable. Same applies to external style sheets linked to the the page. (i.e if they are in the same directory or in different directories)

I tested the above, and it worked for me:

CODE
<link rel="stylesheet" type="text/css" href="/child/test.css">

(with both the HTML and CSS file in the "child" directory).

But note that if the directory "foo" is the web root, the path "/foo" will resolve to "foo/foo".

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Apr 3 2007, 10:01 PM
Post #43


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



QUOTE(Christian J @ Apr 3 2007, 02:32 AM) *

But note that if the directory "foo" is the web root, the path "/foo" will resolve to "foo/foo".


I get it now! (Good morning after supper!) I jumped to the conclusion that the reason was that both files were in the same dirctory. I should know better...

However, the difference between Apache 2 & Apache 2.2 in the root directory still remains as the last part of the puzzle.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post May 12 2007, 06:11 PM
Post #44


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Dr Z @ Mar 29 2007, 09:48 PM) *

First step is the directories:
In the apache directory, s subdirectory named vhosts exists. Inside the vhosts driectory create a sub-direcroy named xyz. Inside the xyz directory we need to create two more directories: htdocs and cgi-bin.

Actually you don't have to place your virtual hosts in the Apache vhosts directory, you can place them anywhere you want such as in My Documents (in Windows). The htdocs and cgi-bin directories are probably not necessary either, havent' tested any CGI scripts this way, but PHP works fine.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

3 Pages V < 1 2 3
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 12:37 PM