For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > October 2006 > urls and paths...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author urls and paths...
matt@londonstudent.co.uk

2006-10-30, 7:04 pm

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.

andy_irl

2006-10-30, 7:04 pm

> Or is there a way like "//includes/header.inc"

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

matt@londonstudent.co.uk

2006-10-30, 7:04 pm

Thanks Andy,

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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com