Title: require(&#8216;../../../wp-blog-header.php&#8217;);
Last modified: August 19, 2016

---

# require(‘../../../wp-blog-header.php’);

 *  [jimfoltz](https://wordpress.org/support/users/jimfoltz/)
 * (@jimfoltz)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/)
 * Hi. Any problem using this code in a php file located in the plugins folder?
 * `require('../../../wp-blog-header.php');`

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/#post-1021357)
 * umm.. well no except that path would put you well above the directory that wp-
   blog-header.php ought to be living in. Maybe you already know that.
 *  Thread Starter [jimfoltz](https://wordpress.org/support/users/jimfoltz/)
 * (@jimfoltz)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/#post-1021361)
 * Thank you. You are right except that I lied – the file is not directly in the
   plugins folder, but rather a sub-folder of plugins.
 * What I am doing is sending html form data using the post method to a ‘update.
   php’ file in my plugin’s folder. Using the ‘require’ was the only way I could
   get the ‘update.php’ file to know it was running in wordpress. I need to make
   sure the user who submitted the form data has authorization to use the database
   by checking if the user is logged in and has the correct role.
 * Is there a better way?
 *  Thread Starter [jimfoltz](https://wordpress.org/support/users/jimfoltz/)
 * (@jimfoltz)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/#post-1021531)
 * To answer my own Q’s, the better way appears to be to use viewer-side AJAX.
 * [http://codex.wordpress.org/AJAX_in_Plugins](http://codex.wordpress.org/AJAX_in_Plugins)
 *  Thread Starter [jimfoltz](https://wordpress.org/support/users/jimfoltz/)
 * (@jimfoltz)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/#post-1021534)
 * Ok, so I read and followed the instructions mentioned in the above link. I think
   I have everything in the right place, but after I submit the form I get the Please
   Register screen.
 *  Thread Starter [jimfoltz](https://wordpress.org/support/users/jimfoltz/)
 * (@jimfoltz)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/#post-1021538)
 * Picky, picky. I had to change this line (the submit for the form):
 * `<input type="submit" value="Update" onClick="ei_update_ex(this.form.name);">`
 * to a type of button:
 * `<input type="button" value="Update" onClick="my_js_func(this.form.name);">`
 * Go me.

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

The topic ‘require(‘../../../wp-blog-header.php’);’ is closed to new replies.

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [jimfoltz](https://wordpress.org/support/users/jimfoltz/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/requirewp-blog-headerphp/#post-1021538)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
