Title: include code not working?
Last modified: August 19, 2016

---

# include code not working?

 *  Resolved [asteria](https://wordpress.org/support/users/asteria/)
 * (@asteria)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/include-code-not-working/)
 * 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](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&#8217](http://asteria-intl.com/wordpress&#8217);
   > 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](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)

 *  [Khairil Zhafri](https://wordpress.org/support/users/poppacket/)
 * (@poppacket)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/include-code-not-working/#post-703888)
 * 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](https://wordpress.org/support/users/asteria/)
 * (@asteria)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/include-code-not-working/#post-704111)
 * 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?
 *  [Khairil Zhafri](https://wordpress.org/support/users/poppacket/)
 * (@poppacket)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/include-code-not-working/#post-704168)
 * 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](https://wordpress.org/support/users/asteria/)
 * (@asteria)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/include-code-not-working/#post-704188)
 * Oh, gosh. I guess I should move on, huh?
    Thank you so much for your help, poppacket!
   =)
 *  [icerabbit](https://wordpress.org/support/users/icerabbit/)
 * (@icerabbit)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/include-code-not-working/#post-704318)
 * 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](http://wordpress.org/support/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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [icerabbit](https://wordpress.org/support/users/icerabbit/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/include-code-not-working/#post-704318)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
