Hello stackoverflow people. I was searching answer for a while and couldn't find it.. What if I'm editing file which is in the directory:
public_html/themes/theme_name/header.php
And i want to:
if (__FILE__ == $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF']){
header("Location: index.php?a=error");
}
If my index.php file is in the public_html
, what path should I use for this function header()
because ..
doesn't work?