WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] address for include files (3 posts)

  1. dorich
    Member
    Posted 2 years ago #

    Problem
    My include files cannot be seen by the browser.

    Scenario
    I've added a folder with some files that I want to include on a page in my blog.

    The set up is a follows
    root folder (it’s a subdomain)
    added folder (-assets)
    included files folder
    file to include(formButton.html)
    wp-content
    themes
    twentyten folder
    header.php

    Inside the header folder I've added the following:

    <?php 
    
     	include ('../../_assets/include_files/formButton.html');
    
    ?>

    It appears to me that the route to the file for the include statement is two folders up but the browser can't find the file.

    Any suggestions on the cause of the problem would be greatly appreciated.

    Thanks

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try using the full path from the document root for includes.

  3. dorich
    Member
    Posted 2 years ago #

    Thanks, that resolved it.

Topic Closed

This topic has been closed to new replies.

About this Topic