Title: using php includes on pages
Last modified: August 18, 2016

---

# using php includes on pages

 *  [bornfamous](https://wordpress.org/support/users/bornfamous/)
 * (@bornfamous)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/using-php-includes-on-pages/)
 * I created a page with a php include in it for rss feeds/headlines, but it doesn’t
   work:
 * [HealthBuzz.org/health-headlines/](http://healthbuzz.org/health-headlines/)
 * What do I need to do to get this working?
 * TIA :o]

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/using-php-includes-on-pages/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/using-php-includes-on-pages/page/2/?output_format=md)

 *  [prissed](https://wordpress.org/support/users/prissed/)
 * (@prissed)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-185671)
 * Get this plugin:
    [http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/](http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/)
 * Then wrap your php code in:
 * <phpcode>
    <?php include("file.php"); ?> </phpcode>
 *  Thread Starter [bornfamous](https://wordpress.org/support/users/bornfamous/)
 * (@bornfamous)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-185674)
 * It worked! Thank you!!!
 *  [chentong](https://wordpress.org/support/users/chentong/)
 * (@chentong)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186176)
 * This doesn’t seem to work for me.
    I am using php v4.3.10 with wordpress 1.5.2
 * After wrapping the php code with <phpcode> and </phpcode>, what I get in the 
   result page is the php code without the wrappers.
 * anyone can help? Thanks.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186177)
 * chentong,
    did you install and activate the plugin linked above before putting
   the code in your page?
 *  [Darcie](https://wordpress.org/support/users/darcie/)
 * (@darcie)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186178)
 * I could not get Include to work correctly for awhile either. The answer for me
   was to upload the php file to my acutal root directory not the blog directory
   and use this line of type.
 * <?
    // must include this script include(‘[http://swatchnot.hender-son-s.com/arrow.php&#8217](http://swatchnot.hender-son-s.com/arrow.php&#8217););?
   > [Want the code?](http://swatchnot.hender-son-s.com/arrowin.php)
 * I will have to try the above as well.
 *  [chentong](https://wordpress.org/support/users/chentong/)
 * (@chentong)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186180)
 * hi moshu,
 * Yes, I did.
    I uploaded the file “phpexec.php” to the wordpress directory of “
   wp-content/plugins/”.
 * Subsequently I activated it from wordpress admin panel’s “plugins”.
 * Then I add the code in the post.
    I think I have done it correctly. Not sure 
   whether there is still any setting in the wordpress that require changes. or 
   is phpexec support wordpress v1.5.2?
 * Darcie, which php file you upload to root directory? the phpexec.php? in such
   case, how are you going to activate the plugins? and your code is without ‘php’
   after ‘<?’. I am very new to php, so this is just to confirm that I understand
   it correctly.
 * Thanks.
 *  [Darcie](https://wordpress.org/support/users/darcie/)
 * (@darcie)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186181)
 * No it was actually just a php file for my progress meter. It is not plug-in ready
   yet. I wish someone would write me a plugin for it. If it were already a plugin
   I think it would not have been a prob.
 * I guess what I am saying is I am doing manually and maybe I should re-insert 
   my question into another forum.
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186182)
 * Darcie – don’t do includes that use URLs, they should only use absolute or relative
   paths within your site. Trying to include a URL usually won’t work…
 * -d
 *  [chentong](https://wordpress.org/support/users/chentong/)
 * (@chentong)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186183)
 * Hi David,
 * I took a look at your CG-Amazon. Not sure whether I understand correctly that
   it doesn’t support realtime price feeding from Amazon.
 * I have been trying to find a way to insert price feeding into a blog post.
 * WP-Amazon and AMM don’t support price feeding. MrRat’ script seems to support
   price feed, but I need to < ?php include …> the result url in a page. (in which
   phpexec doesn’t seem to work for my case…)
 * I am looking at amazon-o-matic too.
 * Not sure whether you have anyway of inserting realtime price feed of an Amazon
   product into a post?
 * Thanks.
 *  [chentong](https://wordpress.org/support/users/chentong/)
 * (@chentong)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186184)
 * Hi David, is cg-quickphp supports command like “include”?
 * For instance, <quickphp include(“[http://www.domain.com/onesection.php&#8221](http://www.domain.com/onesection.php&#8221););/
   >
 * Thanks.
 *  [gmdavis62](https://wordpress.org/support/users/gmdavis62/)
 * (@gmdavis62)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186203)
 * I found that using phpexec with wordpress 2.0 and php 4.4.1 will add `<br />`
   tags to the end of each line of the include making it useless.
 * I am using the non-rich post editor and I cannot find any way to turn this “feature”
   off. I suspect WordPress is adding the `<br />` tags. I don’t see anything adding
   this in the phpexec code.
 *  [gmdavis62](https://wordpress.org/support/users/gmdavis62/)
 * (@gmdavis62)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186204)
 * UPDATE: I just found that (for both runPHP and PHPexec) if you enclose your php
   in `<pre>` `</pre>` tags, WordPress won’t insert `<br />` at the end of each 
   line of the resulting html.
 * However, some php includes still don’t work as expected. I’m not sure yet what
   is happening.
 *  [Paul Smith](https://wordpress.org/support/users/paulsmith/)
 * (@paulsmith)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186212)
 * I tried all the suggestions here and none work running PHPexec in WP 2.0.2.
 *  [jwurster](https://wordpress.org/support/users/jwurster/)
 * (@jwurster)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186213)
 * If you check the plugins that don’t work with wp2.0, phpexec is one of them. 
   I also use this plugin and am looking for a solution.
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/#post-186214)
 * [http://codex.wordpress.org/Plugins/Posts_Formatting](http://codex.wordpress.org/Plugins/Posts_Formatting)
 * RunPHP
    Exec-PHP Safe Include

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/using-php-includes-on-pages/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/using-php-includes-on-pages/page/2/?output_format=md)

The topic ‘using php includes on pages’ is closed to new replies.

## Tags

 * [phpexec](https://wordpress.org/support/topic-tag/phpexec/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 17 replies
 * 12 participants
 * Last reply from: [orchidred](https://wordpress.org/support/users/orchidred/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/using-php-includes-on-pages/page/2/#post-186226)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
