Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I came across this code and was wondering what is FILE

function ch2fi_page_header_output() {
$icon_url = plugins_url( 'favicon.ico', __FILE__ );
?>

What does __FILE__ do in it? Thanks in advance.

share|improve this question
2  
Please always search first on php.net. If you can't find it there, search on queryposts.com or in your source. Thanks. – kaiser Sep 17 '12 at 21:29

closed as off topic by toscho Sep 17 '12 at 21:33

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

__FILE__ is a PHP Magic Constant and is not specific to WordPress.

The full path and filename of the file. If used inside an include, the name of the included file is returned. Since PHP 4.0.2, __FILE__ always contains an absolute path with symlinks resolved whereas in older versions it contained relative path under some circumstances.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.