I have searched high and low and get a lot of different solutions and varialbles containing info to get the absolute path. But they seem to work under some conditions and not under others. Is there one silver bullet way to get the absolute path to the current executing script in php? For me the script will be running from the command line but it should just as well function if run within apache etc.
我搜索了高和低,得到了很多不同的解决方案和包含信息的变量来获得绝对路径。但他们似乎在某些条件下工作,而不是在其他条件下工作。是否有一种方法可以使php的当前执行脚本获得绝对路径?对于我来说,脚本将从命令行运行,但是如果在apache中运行,它也应该是函数。
Clarification: The initial executed script, not the file we are currently in
说明:初始执行的脚本,而不是当前的文件。
15 个解决方案
#1
1
The correct solution is to use the get_included_files
function:
正确的解决方案是使用get_included_files函数:
list($scriptPath) = get_included_files();
This will give you the absolute path of the initial script even if:
这将给出初始脚本的绝对路径,即使:
- This function is called inside an included file
- 这个函数在包含的文件中被调用。
- The current working directory is different from initial script's directory
- 当前工作目录与初始脚本的目录不同。
Here are two test scripts; the main script and an included file:
这里有两个测试脚本;主脚本和包含的文件:
# C:\Users\Redacted\Desktop\main.php
include __DIR__ . DIRECTORY_SEPARATOR . 'include.php';
echoScriptPath();
# C:\Users\Redacted\Desktop\include.php
function echoScriptPath() {
list($scriptPath) = get_included_files();
echo 'The script being executed is ' . $scriptPath;
}
And the result; notice the current directory:
和结果;注意到当前目录:
C:\>php C:\Users\Redacted\Desktop\main.php
The script being executed is C:\Users\Redacted\Desktop\main.php
#2
244
__FILE__
constant will give you absolute path to current file.
__FILE__常量将为您提供当前文件的绝对路径。
UPD:
乌利希期刊指南:
As soon as question was changed to retrieve the script that initiated runtime the only (??) reliable way to do that is to use the debug_backtrace
function.
当问题被更改为获取启动运行时的脚本时,唯一可靠的方法是使用debug_backtrace函数。
$stack = debug_backtrace();
$firstFrame = $stack[count($stack) - 1];
$initialFile = $firstFrame['file'];
#3
220
echo realpath(dirname(__FILE__));
If you place this in an included file, it prints the path to this include. To get the path of the parent script, replace __FILE__
with $_SERVER['PHP_SELF']
. But be aware that PHP_SELF is a security risk!
如果将其放置在包含的文件中,它将输出到其中的路径。要获得父脚本的路径,请用$_SERVER替换__FILE__ ['PHP_SELF']。但请注意,PHP_SELF是一个安全风险!
#4
213
Examples for: https://(www.)example.com/subFolder/yourfile.php?var=blabla#555
示例:https://(www)example.com/subFolder/yourfile.php?var=blabla # 555
typical PHP codes:
//parse_url
$x = parse_url($url);
$x['scheme'] ???? https
$x['host'] ???? example.com
$x['path'] ???? /subFolder/yourfile.php
$x['query'] ???? var=blabla
$x['fragment'] ???? 555 // hashtag outputed only in case, when hashtag-containing string was manually passed to function, otherwise PHP is unable to recognise hashtags in $_SERVER
//pathinfo (If you will ever use this function, I only recommend to pass `parse_url`s output as argument)
A = pathinfo($url);
B = pathinfo(parse_url($url)['path']);
A['dirname'] ???? https://example.com/subFolder
B['dirname'] ???? /subFolder
A['basename'] ???? yourfile.php?var=blabla#555
B['basename'] ???? yourfile.php
A['extension'] ???? php?var=blabla#555
B['extension'] ???? php
A['filename'] ???? yourfile
B['filename'] ???? yourfile
//===================================================
//========== self-defined SERVER variables ==========
//===================================================
$_SERVER["DOCUMENT_ROOT"] ???? /home/user/public_html
$_SERVER["SERVER_ADDR"] ???? 143.34.112.23
$_SERVER["SERVER_PORT"] ???? 80(or 443 etc..)
$_SERVER["REQUEST_SCHEME"] ???? https //like: $_SERVER["SERVER_PROTOCOL"]
$_SERVER['HTTP_HOST'] ???? example.com //like: $_SERVER["ERVER_NAME"]
$_SERVER["REQUEST_URI"] ???? /subFolder/yourfile.php?var=blabla
$_SERVER["QUERY_STRING"] ???? var=blabla
__FILE__ ???? /home/user/public_html/subFolder/yourfile.php
__DIR__ ???? /home/user/public_html/subFolder //like: dirname(__FILE__)
$_SERVER["REQUEST_URI"] ???? /subFolder/yourfile.php?var=blabla
parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH)???? /subFolder/yourfile.php
$_SERVER["PHP_SELF"] ???? /subFolder/yourfile.php
// ==================================================================
//if "YOURFILE.php" is included in "PARENTFILE.php" , and you visit "PARENTFILE.PHP?abc":
$_SERVER["SCRIPT_FILENAME"]???? /home/user/public_html/parentfile.php
$_SERVER["PHP_SELF"] ???? /parentfile.php
$_SERVER["REQUEST_URI"] ???? /parentfile.php?abc
__FILE__ ???? /home/user/public_html/subFolder/yourfile.php
// ===================================================
// ================= handy variables =================
// ===================================================
//If site uses HTTPS:
$HTTP_or_HTTPS = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']!=='off') || $_SERVER['SERVER_PORT']==443) ? 'https://':'http://' ); //in some cases, you need to add this condition too: if ('https'==$_SERVER['HTTP_X_FORWARDED_PROTO']) ...
//To trim values to filename, i.e.
basename($url) ???? yourfile.php
//excellent solution to find origin
$debug_files = debug_backtrace(); $initial_called_file = count($debug_files) ? $debug_files[count($debug_files) - 1]['file'] : __FILE__;
Notice!:
注意!:
- hastag (#...) url parts cant be detected from PHP (server-side). For that, use Javascript.
- 无法从PHP(服务器端)检测到hastag(#…)url部分。为此,使用Javascript。
-
DIRECTORY_SEPARATOR
returns\
for Windows-type hostings, instead of/
. - directory_分离器返回windows类型的主机,而不是/。
For WordPress
//(let's say, if wordpress is installed in subdirectory: http://example.com/wpdir/)
home_url() ???? http://example.com/wpdir/ //if is_ssl() is true, then it will be "https"
get_stylesheet_directory_uri() ???? http://example.com/wpdir/wp-content/themes/THEME_NAME [same: get_bloginfo('template_url') ]
get_stylesheet_directory() ???? /home/user/public_html/wpdir/wp-content/themes/THEME_NAME
plugin_dir_url(__FILE__) ???? http://example.com/wpdir/wp-content/themes/PLUGIN_NAME
plugin_dir_path(__FILE__) ???? /home/user/public_html/wpdir/wp-content/plugins/PLUGIN_NAME/
#5
29
__DIR__
The directory of the file. If used inside an include, the directory of the included file is returned. This is equivalent to
dirname(__FILE__)
. This directory name does not have a trailing slash unless it is the root directory.文件的目录。如果在include中使用,则返回包含的文件的目录。这相当于dirname(__FILE__)。这个目录名没有末尾斜杠,除非它是根目录。
#6
17
getcwd()
is the proper answer - http://php.net/manual/en/function.getcwd.php
getcwd()是正确的答案,http://php.net/manual/en/function.getcwd.php。
__FILE__
will return path with filename for example on XAMPP C:\xampp\htdocs\index.php
__FILE__将返回带有文件名的路径,例如在XAMPP C:\ XAMPP \htdoc \index.php。
What You want is to get current working directory so use getcwd()
to get C:\xampp\htdocs\
您需要的是获取当前工作目录,以便使用getcwd()来获得C:\xampp\htdocs\ !
#7
9
dirname(__FILE__)
will give the absolute route of the current file from which you are demanding the route, the route of your server directory.
将给出当前文件的绝对路由,您需要该文件的路径,即服务器目录的路由。
example files :
示例文件:
www/http/html/index.php ; if you place this code inside your index.php it will return:
www / http / html /索引。php;如果将此代码放入索引中。php它将返回:
<?php echo dirname(__FILE__); // this will return: www/http/html/
< ?php echo目录名(__FILE__);//这将返回:www/http/html/。
www/http/html/class/myclass.php ; if you place this code inside your myclass.php it will return:
www / http / html / / myclass类。php;如果将此代码放在myclass中。php它将返回:
<?php echo dirname(__FILE__); // this will return: www/http/html/class/
< ?php echo目录名(__FILE__);//这将返回:www/http/html/class/。
#8
7
Just use below :
只使用如下:
echo __DIR__;
#9
6
If you're looking for the absolute path relative to the server root, I've found that this works well:
如果您正在寻找相对于服务器根的绝对路径,我发现这很有效:
$_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME'])
#10
5
`realpath(dirname(__FILE__))`
it gives you current script(the script inside which you placed this code) directory without trailing slash. this is important if you want to include other files with the result
它提供了当前脚本(您在其中放置该代码的脚本),而不使用斜杠。如果您想要包含结果的其他文件,这一点很重要。
#11
4
Here's a useful PHP function I wrote for this precisely. As the original question clarifies, it returns the path from which the initial script was executed - not the file we are currently in.
这里有一个有用的PHP函数。正如最初的问题澄清的那样,它返回初始脚本执行的路径,而不是我们当前所在的文件。
/**
* Get the file path/dir from which a script/function was initially executed
*
* @param bool $include_filename include/exclude filename in the return string
* @return string
*/
function get_function_origin_path($include_filename = true) {
$bt = debug_backtrace();
array_shift($bt);
if ( array_key_exists(0, $bt) && array_key_exists('file', $bt[0]) ) {
$file_path = $bt[0]['file'];
if ( $include_filename === false ) {
$file_path = str_replace(basename($file_path), '', $file_path);
}
} else {
$file_path = null;
}
return $file_path;
}
#12
3
In case of using framework, most of them is not working, so I have found the solution for that. Code:
如果使用框架,大多数都不起作用,所以我找到了解决方案。代码:
echo dirname(__FILE__).'\\'.basename(__FILE__);
It should give the absolute path, including file name.
它应该给出绝对路径,包括文件名。
#13
2
realpath($_SERVER['SCRIPT_FILENAME'])
For script run under web server $_SERVER['SCRIPT_FILENAME']
will contain the full path to the initially called script, so probably your index.php. realpath()
is not required in this case.
对于在web server $_SERVER下运行的脚本,['SCRIPT_FILENAME']将包含最初调用脚本的完整路径,所以可能是您的index.php。在本例中不需要realpath()。
For the script run from console $_SERVER['SCRIPT_FILENAME']
will contain relative path to your initially called script from your current working dir. So unless you changed working directory inside your script it will resolve to the absolute path.
对于从控制台$_SERVER['SCRIPT_FILENAME']中运行的脚本,将包含从当前工作目录中最初调用的脚本的相对路径。因此,除非在脚本中更改工作目录,否则它将解析为绝对路径。
#14
1
try this on your script
在你的脚本上试试这个。
echo getcwd() . "\n";
#15
0
The easiest way to retrieve the absolute path of the initially executed script from that "main" script and any script included with include
, require
, require_once
is by storing it in a constant at the beginning of the main script:
从“主”脚本中检索最初执行的脚本的绝对路径,以及包含其中包含的任何脚本,最简单的方法是,在主脚本开始时将其存储在一个常量中:
define( 'SCRIPT_ROOT', __FILE__ );
__FILE__
returns the path of the current script. Used inside an included script returns the path of the included file, not the script initially run as the OP asks:
__FILE__返回当前脚本的路径。在包含的脚本中使用的脚本返回包含的文件的路径,而不是初始运行时的脚本。
Clarification: The initial executed script, not the file we are currently in
说明:初始执行的脚本,而不是当前的文件。
The solution of storing the __FILE__
into a constant is easier and faster than retrieving the path using debug_backtrace()
将__FILE__存储到一个常量中的解决方案比使用debug_backtrace()检索路径要容易得多,也快得多
The solution above is suitable when there is a single "main" script that include
s every other needed script, as in most web applications.
当有一个“主”脚本包含其他所有需要的脚本时,上面的解决方案是合适的,就像在大多数web应用程序中一样。
If that's not the case and there may be several "intital scripts" then to avoid redefinitions and to have the correct path stored inside the constant each script may begin with:
如果不是这样,那么可能会有一些“初始脚本”,以避免重新定义,并将正确的路径存储在常量中,每个脚本可以从以下内容开始:
if( ! defined( 'SCRIPT_ROOT' ) ) {
define( 'SCRIPT_ROOT`, __FILE__ );
}
#1
1
The correct solution is to use the get_included_files
function:
正确的解决方案是使用get_included_files函数:
list($scriptPath) = get_included_files();
This will give you the absolute path of the initial script even if:
这将给出初始脚本的绝对路径,即使:
- This function is called inside an included file
- 这个函数在包含的文件中被调用。
- The current working directory is different from initial script's directory
- 当前工作目录与初始脚本的目录不同。
Here are two test scripts; the main script and an included file:
这里有两个测试脚本;主脚本和包含的文件:
# C:\Users\Redacted\Desktop\main.php
include __DIR__ . DIRECTORY_SEPARATOR . 'include.php';
echoScriptPath();
# C:\Users\Redacted\Desktop\include.php
function echoScriptPath() {
list($scriptPath) = get_included_files();
echo 'The script being executed is ' . $scriptPath;
}
And the result; notice the current directory:
和结果;注意到当前目录:
C:\>php C:\Users\Redacted\Desktop\main.php
The script being executed is C:\Users\Redacted\Desktop\main.php
#2
244
__FILE__
constant will give you absolute path to current file.
__FILE__常量将为您提供当前文件的绝对路径。
UPD:
乌利希期刊指南:
As soon as question was changed to retrieve the script that initiated runtime the only (??) reliable way to do that is to use the debug_backtrace
function.
当问题被更改为获取启动运行时的脚本时,唯一可靠的方法是使用debug_backtrace函数。
$stack = debug_backtrace();
$firstFrame = $stack[count($stack) - 1];
$initialFile = $firstFrame['file'];
#3
220
echo realpath(dirname(__FILE__));
If you place this in an included file, it prints the path to this include. To get the path of the parent script, replace __FILE__
with $_SERVER['PHP_SELF']
. But be aware that PHP_SELF is a security risk!
如果将其放置在包含的文件中,它将输出到其中的路径。要获得父脚本的路径,请用$_SERVER替换__FILE__ ['PHP_SELF']。但请注意,PHP_SELF是一个安全风险!
#4
213
Examples for: https://(www.)example.com/subFolder/yourfile.php?var=blabla#555
示例:https://(www)example.com/subFolder/yourfile.php?var=blabla # 555
typical PHP codes:
//parse_url
$x = parse_url($url);
$x['scheme'] ???? https
$x['host'] ???? example.com
$x['path'] ???? /subFolder/yourfile.php
$x['query'] ???? var=blabla
$x['fragment'] ???? 555 // hashtag outputed only in case, when hashtag-containing string was manually passed to function, otherwise PHP is unable to recognise hashtags in $_SERVER
//pathinfo (If you will ever use this function, I only recommend to pass `parse_url`s output as argument)
A = pathinfo($url);
B = pathinfo(parse_url($url)['path']);
A['dirname'] ???? https://example.com/subFolder
B['dirname'] ???? /subFolder
A['basename'] ???? yourfile.php?var=blabla#555
B['basename'] ???? yourfile.php
A['extension'] ???? php?var=blabla#555
B['extension'] ???? php
A['filename'] ???? yourfile
B['filename'] ???? yourfile
//===================================================
//========== self-defined SERVER variables ==========
//===================================================
$_SERVER["DOCUMENT_ROOT"] ???? /home/user/public_html
$_SERVER["SERVER_ADDR"] ???? 143.34.112.23
$_SERVER["SERVER_PORT"] ???? 80(or 443 etc..)
$_SERVER["REQUEST_SCHEME"] ???? https //like: $_SERVER["SERVER_PROTOCOL"]
$_SERVER['HTTP_HOST'] ???? example.com //like: $_SERVER["ERVER_NAME"]
$_SERVER["REQUEST_URI"] ???? /subFolder/yourfile.php?var=blabla
$_SERVER["QUERY_STRING"] ???? var=blabla
__FILE__ ???? /home/user/public_html/subFolder/yourfile.php
__DIR__ ???? /home/user/public_html/subFolder //like: dirname(__FILE__)
$_SERVER["REQUEST_URI"] ???? /subFolder/yourfile.php?var=blabla
parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH)???? /subFolder/yourfile.php
$_SERVER["PHP_SELF"] ???? /subFolder/yourfile.php
// ==================================================================
//if "YOURFILE.php" is included in "PARENTFILE.php" , and you visit "PARENTFILE.PHP?abc":
$_SERVER["SCRIPT_FILENAME"]???? /home/user/public_html/parentfile.php
$_SERVER["PHP_SELF"] ???? /parentfile.php
$_SERVER["REQUEST_URI"] ???? /parentfile.php?abc
__FILE__ ???? /home/user/public_html/subFolder/yourfile.php
// ===================================================
// ================= handy variables =================
// ===================================================
//If site uses HTTPS:
$HTTP_or_HTTPS = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']!=='off') || $_SERVER['SERVER_PORT']==443) ? 'https://':'http://' ); //in some cases, you need to add this condition too: if ('https'==$_SERVER['HTTP_X_FORWARDED_PROTO']) ...
//To trim values to filename, i.e.
basename($url) ???? yourfile.php
//excellent solution to find origin
$debug_files = debug_backtrace(); $initial_called_file = count($debug_files) ? $debug_files[count($debug_files) - 1]['file'] : __FILE__;
Notice!:
注意!:
- hastag (#...) url parts cant be detected from PHP (server-side). For that, use Javascript.
- 无法从PHP(服务器端)检测到hastag(#…)url部分。为此,使用Javascript。
-
DIRECTORY_SEPARATOR
returns\
for Windows-type hostings, instead of/
. - directory_分离器返回windows类型的主机,而不是/。
For WordPress
//(let's say, if wordpress is installed in subdirectory: http://example.com/wpdir/)
home_url() ???? http://example.com/wpdir/ //if is_ssl() is true, then it will be "https"
get_stylesheet_directory_uri() ???? http://example.com/wpdir/wp-content/themes/THEME_NAME [same: get_bloginfo('template_url') ]
get_stylesheet_directory() ???? /home/user/public_html/wpdir/wp-content/themes/THEME_NAME
plugin_dir_url(__FILE__) ???? http://example.com/wpdir/wp-content/themes/PLUGIN_NAME
plugin_dir_path(__FILE__) ???? /home/user/public_html/wpdir/wp-content/plugins/PLUGIN_NAME/
#5
29
__DIR__
The directory of the file. If used inside an include, the directory of the included file is returned. This is equivalent to
dirname(__FILE__)
. This directory name does not have a trailing slash unless it is the root directory.文件的目录。如果在include中使用,则返回包含的文件的目录。这相当于dirname(__FILE__)。这个目录名没有末尾斜杠,除非它是根目录。
#6
17
getcwd()
is the proper answer - http://php.net/manual/en/function.getcwd.php
getcwd()是正确的答案,http://php.net/manual/en/function.getcwd.php。
__FILE__
will return path with filename for example on XAMPP C:\xampp\htdocs\index.php
__FILE__将返回带有文件名的路径,例如在XAMPP C:\ XAMPP \htdoc \index.php。
What You want is to get current working directory so use getcwd()
to get C:\xampp\htdocs\
您需要的是获取当前工作目录,以便使用getcwd()来获得C:\xampp\htdocs\ !
#7
9
dirname(__FILE__)
will give the absolute route of the current file from which you are demanding the route, the route of your server directory.
将给出当前文件的绝对路由,您需要该文件的路径,即服务器目录的路由。
example files :
示例文件:
www/http/html/index.php ; if you place this code inside your index.php it will return:
www / http / html /索引。php;如果将此代码放入索引中。php它将返回:
<?php echo dirname(__FILE__); // this will return: www/http/html/
< ?php echo目录名(__FILE__);//这将返回:www/http/html/。
www/http/html/class/myclass.php ; if you place this code inside your myclass.php it will return:
www / http / html / / myclass类。php;如果将此代码放在myclass中。php它将返回:
<?php echo dirname(__FILE__); // this will return: www/http/html/class/
< ?php echo目录名(__FILE__);//这将返回:www/http/html/class/。
#8
7
Just use below :
只使用如下:
echo __DIR__;
#9
6
If you're looking for the absolute path relative to the server root, I've found that this works well:
如果您正在寻找相对于服务器根的绝对路径,我发现这很有效:
$_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME'])
#10
5
`realpath(dirname(__FILE__))`
it gives you current script(the script inside which you placed this code) directory without trailing slash. this is important if you want to include other files with the result
它提供了当前脚本(您在其中放置该代码的脚本),而不使用斜杠。如果您想要包含结果的其他文件,这一点很重要。
#11
4
Here's a useful PHP function I wrote for this precisely. As the original question clarifies, it returns the path from which the initial script was executed - not the file we are currently in.
这里有一个有用的PHP函数。正如最初的问题澄清的那样,它返回初始脚本执行的路径,而不是我们当前所在的文件。
/**
* Get the file path/dir from which a script/function was initially executed
*
* @param bool $include_filename include/exclude filename in the return string
* @return string
*/
function get_function_origin_path($include_filename = true) {
$bt = debug_backtrace();
array_shift($bt);
if ( array_key_exists(0, $bt) && array_key_exists('file', $bt[0]) ) {
$file_path = $bt[0]['file'];
if ( $include_filename === false ) {
$file_path = str_replace(basename($file_path), '', $file_path);
}
} else {
$file_path = null;
}
return $file_path;
}
#12
3
In case of using framework, most of them is not working, so I have found the solution for that. Code:
如果使用框架,大多数都不起作用,所以我找到了解决方案。代码:
echo dirname(__FILE__).'\\'.basename(__FILE__);
It should give the absolute path, including file name.
它应该给出绝对路径,包括文件名。
#13
2
realpath($_SERVER['SCRIPT_FILENAME'])
For script run under web server $_SERVER['SCRIPT_FILENAME']
will contain the full path to the initially called script, so probably your index.php. realpath()
is not required in this case.
对于在web server $_SERVER下运行的脚本,['SCRIPT_FILENAME']将包含最初调用脚本的完整路径,所以可能是您的index.php。在本例中不需要realpath()。
For the script run from console $_SERVER['SCRIPT_FILENAME']
will contain relative path to your initially called script from your current working dir. So unless you changed working directory inside your script it will resolve to the absolute path.
对于从控制台$_SERVER['SCRIPT_FILENAME']中运行的脚本,将包含从当前工作目录中最初调用的脚本的相对路径。因此,除非在脚本中更改工作目录,否则它将解析为绝对路径。
#14
1
try this on your script
在你的脚本上试试这个。
echo getcwd() . "\n";
#15
0
The easiest way to retrieve the absolute path of the initially executed script from that "main" script and any script included with include
, require
, require_once
is by storing it in a constant at the beginning of the main script:
从“主”脚本中检索最初执行的脚本的绝对路径,以及包含其中包含的任何脚本,最简单的方法是,在主脚本开始时将其存储在一个常量中:
define( 'SCRIPT_ROOT', __FILE__ );
__FILE__
returns the path of the current script. Used inside an included script returns the path of the included file, not the script initially run as the OP asks:
__FILE__返回当前脚本的路径。在包含的脚本中使用的脚本返回包含的文件的路径,而不是初始运行时的脚本。
Clarification: The initial executed script, not the file we are currently in
说明:初始执行的脚本,而不是当前的文件。
The solution of storing the __FILE__
into a constant is easier and faster than retrieving the path using debug_backtrace()
将__FILE__存储到一个常量中的解决方案比使用debug_backtrace()检索路径要容易得多,也快得多
The solution above is suitable when there is a single "main" script that include
s every other needed script, as in most web applications.
当有一个“主”脚本包含其他所有需要的脚本时,上面的解决方案是合适的,就像在大多数web应用程序中一样。
If that's not the case and there may be several "intital scripts" then to avoid redefinitions and to have the correct path stored inside the constant each script may begin with:
如果不是这样,那么可能会有一些“初始脚本”,以避免重新定义,并将正确的路径存储在常量中,每个脚本可以从以下内容开始:
if( ! defined( 'SCRIPT_ROOT' ) ) {
define( 'SCRIPT_ROOT`, __FILE__ );
}