• 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)
  • 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

    (@aprasad)

    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…

    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

    Including Any Template

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

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