View Single Post
Old 09-17-2012, 05:00 AM  
EN1GMA
Confirmed User
 
EN1GMA's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 1,251
Another PHP little question

Hello guys,

Maybe someone can help me again with a PHP question.

I have WEBSITE A and WEBSITE B

In WEBSITE A I created a php file and I display the content on my index.php using this code:
PHP Code:
<?php include 'block/content.php'?>
Now I want to display the exactly same file/content in WEBSITE B, for that I'm using this code:
PHP Code:
<?php include '/home/username_website_a/public_html/block/content.php'?>
But I got the error:
Code:
Warning: include(/home/username_website_a/public_html/block/content.php) [function.include]: failed to open stream: Permission denied in /home/username_website_b/public_html/index.php on line 45

Warning: include() [function.include]: Failed opening '/home/username_website_a/public_html/block/content.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username_website_b/public_html/index.php on line 45
The idea is to edit just one file and display changes in both websites.
But Im a newbie and I dont know If this is possible.

Can someone help me please? :-)
Thanks!!
EN1GMA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook