Index.php Text

Toz

Elite Member
Jr. VIP
Joined
Oct 24, 2011
Messages
3,219
Reaction score
3,625
So I opened up the index.php file of a plugin I was thinking about installing, and noticed this and only this inside:
Code:
<?php // golden
I ran a Google search to see what it was about, but the only thing that I keep seeing is this (which is / appears different than the plugin I'm referring to):
Code:
<?php
// Silence is golden.
Do these mean the same?
 
So I opened up the index.php file of a plugin I was thinking about installing, and noticed this and only this inside:
Code:
<?php // golden
I ran a Google search to see what it was about, but the only thing that I keep seeing is this (which is / appears different than the plugin I'm referring to):
Code:
<?php
// Silence is golden.
Do these mean the same?

Yup, this is used to prevent unauthorized access to that particular map. :)
 
  • Like
Reactions: Toz
I don't think php comments appear at all in the front-end, so they won't be appearing to visitors neither google
For HTML, google should ignore them in most of the cases, logically at least, i have no experience with this
I'll be following!
 
  • Like
Reactions: Toz
Let's say you have a folder, with a number of files. To prevent listing of this directory, on insecure servers, a empty index.php or index.html file is placed, to avoid listing of all files in that folder, when is accessed through browser. Silence is golden, is just a pure quote, as some programmers love those kind of clues.
 
  • Like
Reactions: Toz
It's just a fancy comment line to say that this page has nothing. It is overlooked by the PHP interpreter because it's a comment line ofcourse. If you run that file, it will have no output, but it will prevent the directory structure to be shown.
 
  • Like
Reactions: Toz
index.php is created for hide others files in this folder/diractory. example: wp-content/themes/ if index .php or .html is not here then visitor can see that how many themes installed in your website and what the name of those themes
or you can block access via .htaccess, no need any blank index.php
 
  • Like
Reactions: Toz
index.php is created for hide others files in this folder/diractory. example: wp-content/themes/ if index .php or .html is not here then visitor can see that how many themes installed in your website and what the name of those themes
Woah. WTF!?
That's insane.
*Goes to check all other installed plugins*
haha

EDIT: Okay, so if I'm in the Plugin Editor section and notice a plugin that doesn't have this index.php comment file listed in the root of that plugin's Plugin Files area, should I create that file? I've found a couple that don't have it.
 
Last edited:
Back
Top