Title: trying to &quot;include&quot; php&#8230;
Last modified: September 1, 2016

---

# trying to "include" php…

 *  [gregmcateer2](https://wordpress.org/support/users/gregmcateer2/)
 * (@gregmcateer2)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/trying-to-include-php/)
 * Hello,
 * Thanks for writing this…so far looks great. Quick question(s):
 * 1. Can you do an include and then reference functions within the included php
   file? doesn’t seem to be working for me.
 * 2. To work around that, I created a snippet with the functions in that call it
   php1, then in php2 I reference a function in php1, it threw an error:
 * Fatal error: Call to undefined function debugVars() in /home/content/48/8186948/
   html/salesforcecertification/wp-content/plugins/php-code-for-posts/Classes/Shortcode.
   php(81) : eval()’d code on line 8
 * It’s pretty basic code, and if I run it directly in a snippet…works fine.
 * Thanks,
 * Greg
 * [https://wordpress.org/plugins/php-code-for-posts/](https://wordpress.org/plugins/php-code-for-posts/)

Viewing 1 replies (of 1 total)

 *  [stamatiach](https://wordpress.org/support/users/stamatiach/)
 * (@stamatiach)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/trying-to-include-php/#post-8501436)
 * Did you find any solution for this?

Viewing 1 replies (of 1 total)

The topic ‘trying to "include" php…’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/php-code-for-posts_0d1022.svg)
 * [PHP Code for posts](https://wordpress.org/plugins/php-code-for-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-code-for-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-code-for-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/php-code-for-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-code-for-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-code-for-posts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [stamatiach](https://wordpress.org/support/users/stamatiach/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/trying-to-include-php/#post-8501436)
 * Status: not resolved