» Home
Monday, February 26, 2018 - 03:22:30

How to get a PHP file to be included across files in different directories?

Currently I have created some php based webpages and uploaded them to my web hosting server.It has a PHP 5.1.6
installed.With this I am able to include files only that are in the same directory(they work well using require() fn).If not an error message displaying some "no such file" in directory appears in the page.I would like to use them to be included in different direcetories.What should I do?

Asked by demouser 5 years ago In Programming, answers (1), visited (1204)

php webpages directory

Posted on : Sunday, February 3, 2013, 07:36:43 In Programming


create the directories and include the names when using the require() function.

example :

your index.php is in the root directory
and you have a directory with your other php files in

so in index.php you will have

Answered: Sunday, February 3, 2013, 07:52:47, 5 years ago User Rating: 0  Votes: +0 -0
Last Questions

What is enigma?

I am confused about word enigma. What is that? Posted on : Thursday, August 31, 2017, 22:45:55

What's the worst Star Wars film?

Episode 1 Episode 2 Episode 3 Episode 4 Episode 5 Episode 6 Episode 7 Posted on : Tuesday, January 17, 2017, 13:07:53

ce filme va plac?

voua ce filme va plac sau urmariti in general? Posted on : Sunday, November 27, 2016, 14:29:46

What is the best programming language to start with?

Hello! I am wanting to learn programming, but I dont know which language I should start off... Posted on : Saturday, November 12, 2016, 02:35:09

How old James bond ?

Hi , How old James bond ? Any body know ? Posted on : Wednesday, March 30, 2016, 21:37:39

What is social bookmarking?

Can somebody explain me what mean social bookmarking? Is good for traffic to website or what?... Posted on : Sunday, August 23, 2015, 10:26:36

What is the best way to play guitar?

Want to know who knows how to play guitar Posted on : Monday, July 13, 2015, 21:03:39

what is dreamweaver

i want to know about the software of adobe named dremaweaver? Posted on : Tuesday, August 12, 2014, 17:03:41