Forum Moderators: coopster
So my question is, is there any way, without using frames, to include a PHP file as it would be if you link directly to it in the address bar, but placed into another file in a different directory?
Thank you,
Jacob
So my question is, is there any way, without using frames, to include a PHP file as it would be if you link directly to it in the address bar, but placed into another file in a different directory?
The question is not very clear to me. But let me tell you what I understood, and what you can do, if I misunderstand you, I apologize.
You want to include a file which is physically let's say in /fol1/fol2/fol3/file.php
Though that is the physical location, you want it to appear as if it has come from /fol1/fol2/file.php
If that is what you are looking for, I don't see the application, but you might have certain reasons, what I think you should do is, to create file.php in /fol1/fol2/file.php which "inlude"s the file.php in /fol1/fol2/fol3
This file /fol1/fol2/file.php online contains the line:
include("fol3/file.php");
I am much out of the way, let me know.
Habtom
Here's my folders and some of their contents:
site/
--index.php <? include('shoutbox/index.php');>
--functions.php
--header.php
--shoutbox/
----index.php <? require_once('functions.php'); require_once('settings.php');?>
----functions.php
----settings.php
--admin/
----index.php <? include('shoutbox/index.php');>
Now I want to include my shoutbox from index.php and admin/index.php, but then shoutbox/index.php tries to require_once settings.php, which doesn't exist, functions.php, which doesn't have the shoutbox's functions, and admin/settings.php, when I include it from the admin's index.php.
What I need to do is create the results as if I made the shoutbox in an iframe, which I don't want to do.
I hope I got this explained.
Thank you,
Jacob