Forum Moderators: coopster

Message Too Old, No Replies

Add A Php file on another domain

Add A Php file on another domain

         

vivek avasthi

12:35 pm on May 15, 2006 (gmt 0)

10+ Year Member



I have a php file in a domain ...script.php i want to use it on another domain...how will i do this ...

i used ... include("/home/sitename/public_html/file_name.php");

but its not working can someone help me...

its urgent

barns101

1:54 pm on May 15, 2006 (gmt 0)

10+ Year Member



open_basedir may be in effect. This prevents you from opening or including files outside of your directory-tree.

See the PHP documentation [php.net] for details.

coopster

4:56 pm on May 15, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I don't think it has even got that far yet. I notice there is no schema in the included file. To include() [php.net] through HTTP you need the schema:
include 'http://www.example.com/file_name.php';

vivek avasthi

8:24 am on May 16, 2006 (gmt 0)

10+ Year Member



actually i want to add this php file on another domain and use it like we include in same domain and use it.

like if i have a top.php in domain one i included it in every page and use it.

if i have another domain domain 2 can i use it there too...

barns101

8:26 am on May 16, 2006 (gmt 0)

10+ Year Member



Yes, that should be possible. Are both domains on the same server?

vivek avasthi

11:05 am on May 16, 2006 (gmt 0)

10+ Year Member



you both domain on same server i hav tried Include() function but its not working.