• Resolved asteria

    (@asteria)


    I recently re-installed wordpress using fantastico on my website because it wasn’t working, but it still doesn’t work. Well, the blog itself works, but the include code that I’m using doesn’t. I used the php include code to put the blog on the front page of my website, but this is all that shows up:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/asteria/public_html/index.php on line 3

    Warning: include(http://asteria-intl.com/wordpress) [function.include]: failed to open stream: no suitable wrapper could be found in /home/asteria/public_html/index.php on line 3

    Warning: include() [function.include]: Failed opening ‘http://asteria-intl.com/wordpress’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/asteria/public_html/index.php on line 3

    This is what line three says in that file:

    <?php include(“http://asteria-intl.com/wordpress&#8221;); ?>

    Is there anything wrong with that code?
    I don’t understand. Please help. It’ll be so greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • It appears that your host has disabled it, usually for security.

    You can use cURL instead.

    <?php // Initialize the CURL library
    $cURL = curl_init();
    
    // Set the URL to execute
    curl_setopt($cURL, CURLOPT_URL, "http://asteria-intl.com/wordpress");
    
    // Set options. More info at http://my.php.net/curl-setopt
    curl_setopt($cURL, CURLOPT_HEADER, 0);
    curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
    
    // Execute, saving results in a variable
    $strPage = curl_exec($cURL);
    
    // Close CURL resource
    curl_close($cURL);
    
    // This will print out the HTML contents
    echo($strPage);
    ?>
    Thread Starter asteria

    (@asteria)

    Oh, thanks!
    Um, well I think that solved my problem, but now this comes up:

    Fatal error: Call to undefined function curl_init() in /home/asteria/public_html/index.php on line 4

    and line 4:
    $cURL = curl_init();

    Do I have to install something?

    Most probably cURL is not supported. That is even worse. Better get a new host.

    Go check if it is by executing <?php info(); ?> in any .php file.

    Thread Starter asteria

    (@asteria)

    Oh, gosh. I guess I should move on, huh?
    Thank you so much for your help, poppacket! =)

    I had the exact three errors with a php file I am trying to link outside of WP, and was able to solve it by using this solution:

    Topic 164222

    Figured I would update this thread to include that, so others will benefit.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘include code not working?’ is closed to new replies.