Forum Moderators: coopster
i have several domains on the same server and i want to use include file..
for example ;
abc.php at [abc.com...] and i want to use abc.php file at other domains.. can i? and how?
thanks in advance
include 'http://www.abc.com/abc.php';
However, Windows versions of PHP prior to PHP 4.3.0 do not support accessing remote files via this function, even if allow_url_fopen is enabled.
coopster: True. I assumed this was on a shared (hosting) server. In this case, wouldn't there be authorization issues? I've never tried it.
include( $_SERVER["DOCUMENT_ROOT"] . "/script_location/script_name.php" );
and you shouldn't have many problems. i use "about the same" construct for pulling ad material from a central domain.
<?
include ("/home/mysite/public_html/abc.php");
?>
it is working and thanks for your help...
i am wondering ;
can we get out any table or link or some words from include file for example ;
"/home/mysite/public_html/abc.php";
i want to get out a link from abc.php
is it possible? & how?
thank you guyss
abc.php is a link page at mymainsite and i want to use it on my other site (my2site) with include file
/home/mymaindomain/public_html/abc.php = [my2site.com...]
and i don't want 2 links from abc.php and need rest ogf tme (28 links) to be places at [my2site.com...]
hope it is okey with my poos english
it is www.samuelaaaaa.com/link/europe.php
europe.php is as follow ;
---0000---
<?
include "inc/up.html";
include "/home/samuel/public_html/data_linksold/europe.html";
include "inc/down.html";
?>
---0000---
and i want to get out a link from europe.html <a href="http://www.123.com">www.123</a> - your choice on the web.<br>
should i do ;
<?
include "inc/up.html";
include "/home/samuel/public_html/data_linksold/europe.html";
include "inc/down.html";
?>
<?
if ($_SERVER['HTTP_HOST'] == "www.samuel.com") {
?>
<a href="http://www.123.com">www.123</a> - your choice on the web.<br>
<?
}
?>
"www.samuel.com" should be domain has europe.html? or?
thanks in advance
[edited by: jatar_k at 11:15 pm (utc) on Sep. 29, 2003]
[edit reason] delinked url [/edit]
That should do it.