Title: Issue with include_once()
Last modified: August 19, 2016

---

# Issue with include_once()

 *  Resolved [giantmetalbowser](https://wordpress.org/support/users/giantmetalbowser/)
 * (@giantmetalbowser)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/issue-with-include_once/)
 * I’m having a problem with the include_once() function. I am currently using the
   Ahimsa theme and have placed myfile.php in the ahimsa folder. Then in ahimsa’s
   entry.php file, I added the following to attempt to use the code from myfile.
   php:
 *     ```
       if(trim(wp_title("", false)) == "myfile")
       {
         include_once("myfile.php");
         echo "got myfile.php";
       }
       ```
   
 * The “got myfile.php” output appears on the correct page just fine, but for some
   reason the contents of myfile.php appear to be from an older version of the file,
   which displays the text “This is myfile.php” and a list of $_GET keys and values.
   I changed the contents of myfile.php to a simple echo statement, but the output
   didn’t change. I don’t know how it happened, since the version of the file it
   appears to be outputting was never in the folder. I even created a new file, 
   named it myfile.php, pasted the contents into the new file and placed it in the
   ahimsa folder, but the problem still persists.
 * I’m not sure if it’s important, but I am currently using an offline local site
   on a computer running Ubuntu.
 * Thanks for the help!

Viewing 1 replies (of 1 total)

 *  Thread Starter [giantmetalbowser](https://wordpress.org/support/users/giantmetalbowser/)
 * (@giantmetalbowser)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/issue-with-include_once/#post-1560532)
 * Found the problem, apparently includes_once() went to the to folder I had installed
   WordPress in rather than staying in the ahimsa folder. I had accidentally left
   the old versions of the file there that I was having problems with. I replaced
   it with the new version, and everything’s fine now 🙂

Viewing 1 replies (of 1 total)

The topic ‘Issue with include_once()’ is closed to new replies.

## Tags

 * [include_once](https://wordpress.org/support/topic-tag/include_once/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [giantmetalbowser](https://wordpress.org/support/users/giantmetalbowser/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/issue-with-include_once/#post-1560532)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
