Title: include $_SERVER[&#039;DOCUMENT_ROOT&#039;].$file; NOT WORKING
Last modified: August 24, 2016

---

# include $_SERVER['DOCUMENT_ROOT'].$file; NOT WORKING

 *  [bastian79](https://wordpress.org/support/users/bastian79/)
 * (@bastian79)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/include-_serverdocument_rootfile-not-working/)
 * $file = “/folder/file.php”;
    include $_SERVER[‘DOCUMENT_ROOT’].$file;
 * IS NOT WORKING NOW
 * [https://wordpress.org/plugins/insert-php/](https://wordpress.org/plugins/insert-php/)

Viewing 1 replies (of 1 total)

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/include-_serverdocument_rootfile-not-working/#post-6023132)
 * What do you mean by not working?
 * Does your file.php spawn errors? If this is the error, then file.php needs to
   be fixed.
 * Does your document_root/folder/file.php exist? If this is the error, then file.
   php needs to be placed where it’s expected to be.
 * Will

Viewing 1 replies (of 1 total)

The topic ‘include $_SERVER['DOCUMENT_ROOT'].$file; NOT WORKING’ is closed to new
replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [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/)

 * 1 reply
 * 2 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/include-_serverdocument_rootfile-not-working/#post-6023132)
 * Status: not resolved