473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

urls and paths...

Hello

Any help appreciated.

I have a php file which contains a request for a header and footer.

This file is in http://www.mydomain.com/folder1/folder2/index.php

If I have my header and footer in:

http://www.mydomain.com/folder1/includes/header.inc
http://www.mydomain.com/folder1/includes/footer.inc

What is the path to these files that I should use in the index.php file
to access these include files?

Do I have to use the full static URL
(http://www.mydomain.com/folder1/includes/header.inc)?
Or is there a way like "//includes/header.inc"
Where I can come down a level in the heirarchy and reach the file?

Thanks for your help.

Oct 26 '06 #1
2 1082
Or is there a way like "//includes/header.inc"

You can use relative paths ie include "../includes/header.inc"

Oct 26 '06 #2
Thanks Andy,

I got it to work at the same time you posted.
Appreciate your help.

Oct 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stefan Seefeld | last post by:
hi there, I'm generating a set of html pages that refer to each other via relative URLs. However, during the generation of these files I only deal with paths (as generated by the os.path...
10
by: Chris Guimbellot | last post by:
Hello, I am trying to create vanity URLs (I think that's what they are called) that link directly to an item's listing page on my site. Currently, the urls are set up something like the...
3
by: Patrick Coleman | last post by:
Hi, I'm looking for a function to split urls into their component parts, ie protocol, host, path, filename, extension. I'm really only looking for path and hostname (so I can download a webpage...
24
by: sinister | last post by:
After doing a websearch, it appears that it's OK to omit the "http:" to form a relative URL. Are there any pitfalls to this? For example, if there is a page http://www.domain1.com/page1.html...
21
by: AES/newspost | last post by:
My understanding -- I'm not an expert -- is that on (some? many? all?) standard Internet servers a URL can point to a subdirectory name followed by a backslash, and that links to this URL will...
2
by: abcd | last post by:
I am using https protocol and some of my pages are using relatie paths to our images folder and gif files... when the page is rendered the images are not rendered.....is there anything wrong...
10
by: tom | last post by:
hi group, i desperately need a function that will transform relative URLs to absolute URLs in the SRC part of <img> tags. ie: function makeAbsolute($html,$basehref) { //if regex match =...
19
by: Alan J. Flavell | last post by:
The story so far: on somewhat unrelated newsgroup, my attention fell upon the URL: http://www.speedtouchdsl.com/prod706.htm which contains a link to the purported URL:...
5
by: David | last post by:
Hi all, Using C#.NET 1.1 I am progressing on my URL ReWriting quite well, but have a slight problem. My server will not have real paths, just virtual, which is generated from a database....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.