Title: php include not working
Last modified: August 19, 2016

---

# php include not working

 *  [aPrasad](https://wordpress.org/support/users/aprasad/)
 * (@aprasad)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/php-include-not-working/)
 * In my header file, i am trying to include the following code where the banner
   is
    `<?php include('http://www.domain.com/adverts/test.txt')?>` however when 
   i look at the header, that line of code doesn’t exist and there is no call to
   the actual contents of the file.
 * the permission of test has been tested with 644, 777 and 755
 * appreciate any help!

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

 *  [Equal Web Creative](https://wordpress.org/support/users/equalwebcreative/)
 * (@equalwebcreative)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/php-include-not-working/#post-1610172)
 * It is probably because the file you are trying to include is not a PHP file. 
   Save it as PHP instead and then try it.
 *  Thread Starter [aPrasad](https://wordpress.org/support/users/aprasad/)
 * (@aprasad)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/php-include-not-working/#post-1610286)
 * hi, i tried with a php file also, same result… btw you can include any type of
   file, it doesn’t have to be a php file…
 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/php-include-not-working/#post-1610292)
 * See if anything in this article helps.
 * _“…there is also a convenient way to include any file. To do so, you will need
   to use the include PHP function, and a constant WordPress conveniently defines
   for you to make things easy: TEMPLATEPATH… “
    
   
    [Include Tags](http://codex.wordpress.org/Include_Tags#Include_Tags)
 * [Including Any Template ](http://codex.wordpress.org/Include_Tags#Including_Any_Template)

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

The topic ‘php include not working’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/php-include-not-working/#post-1610292)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
