Title: require issue
Last modified: August 20, 2016

---

# require issue

 *  Resolved [Rovaron](https://wordpress.org/support/users/rovaron/)
 * (@rovaron)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/require-issue/)
 * i’m trying to require an class(phpMailer) but for some magic reason i can’t.
 * this is the error:
    `Fatal error: require() [function.require]: Failed opening
   required 'http://www.toplifefiltros.com.br/distribuidor-oficial/wp-content/themes/
   toplife/class.phpmailer.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
   in /home/toplifef/public_html/distribuidor-oficial/wp-content/plugins/insert-
   php/insert_php.php(48) : eval()'d code on line 2`
 * sorry for the bad english and for the newbie question too.
 * [http://wordpress.org/extend/plugins/insert-php/](http://wordpress.org/extend/plugins/insert-php/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/require-issue/#post-3256838)
 * Rovaron, when the error message contains “: eval()’d code on line…”, then the
   issue is almost certainly with the PHP code being processed instead of with the
   plugin itself.
 * Put your code in a stand-alone PHP script. Upload the PHP script to your server
   and type its URL into your browser. Probably, you’ll get a similar error message
   minus the “eval()’d code” part.
 * I don’t know what the rest of your code looks like, so I’m guessing at a solution.
   My thought is your PHP installation does not allow [http://&#8230](http://&#8230);
   URLs in the require() statement. See
    [http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen](http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen)
 * Try this solution:
 * `require( $_SERVER["DOCUMENT_ROOT"] . "/distribuidor-oficial/wp-content/themes/
   toplife/class.phpmailer.php" );`
 * I hope it works for you.
 * Will
 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/require-issue/#post-3256856)
 * Gratuitous content so the system will accept the “resolved” checkbox.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘require issue’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/require-issue/#post-3256856)
 * Status: resolved