Created
July 25, 2017 06:23
-
-
Save kousherAlam/60ec5322d7bc1e734e11bd87dfdfe05b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define( 'SHORTINIT', true ); | |
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; | |
$url = $_SERVER['REQUEST_URI']; | |
$my_url = explode('wp-content' , $url); | |
$path = $_SERVER['DOCUMENT_ROOT']."/".$my_url[0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now path variable is in the root of your wordpress directory.