Activity Stream
48,167 MEMBERS
6761 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member

    Default 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!!
    Divvy Reviewed by Divvy on . 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 include 'block/content.php'; ?> Now I want to display the exactly same file/content in WEBSITE B, for that I'm using this code: Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    GigaServers.net InterWAP.ro
    CHMOD your /home/username_website_a/public_html/block/content.php file in order to have read access from all users.

  4.     
    #3
    Respected Member
    You will have to change the owner or group to allow the other website (group) to access it..

  5.     
    #4
    Banned
    Why not do something like:

    Code: 
    <?php include 'http://websitea.com/block/content.php'; ?>


  6.     
    #5
    Member
    Website's:
    sborg.us
    ^^ You can't do this. It is a PHP file

    V3g3ta | Halcyon | Abhi

  7.     
    #6
    Member
    Website's:
    GigaServers.net InterWAP.ro
    you can't include URL's, only in case that you activate allow_url_include in your php.ini file

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. <?php tag question
    By Porsche_maniak in forum Web Development Area
    Replies: 7
    Last Post: 1st Feb 2012, 10:35 PM
  2. DLE question
    By Divvy in forum Webmaster Discussion
    Replies: 4
    Last Post: 2nd Apr 2011, 03:00 PM
  3. Replies: 5
    Last Post: 3rd Jan 2010, 05:23 PM
  4. question
    By priviet02 in forum Hosting Discussion
    Replies: 2
    Last Post: 24th Sep 2009, 02:07 PM
  5. Question!
    By Luke in forum General Discussion
    Replies: 8
    Last Post: 23rd Sep 2009, 03:30 PM

Tags for this Thread

BE SOCIAL