Nicolae Posted November 15, 2014 Share Posted November 15, 2014 Hello. I need help. It is posible to make php file.. index. The main page on website like <?php //sillence is golden I want this but i want to know it is posible? Please help Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/ Share on other sites More sharing options...
Ch0cu3r Posted November 15, 2014 Share Posted November 15, 2014 Yes. Lines starting with // are ignored. These are called comments Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496679 Share on other sites More sharing options...
Nicolae Posted November 15, 2014 Author Share Posted November 15, 2014 (edited) Yes. Lines starting with // are ignored. These are called comments Yes. I know that // are comments, but how to make index.php like this? I want that content of main index page will this but site must work. P.S. Sorry for my bad english. Edited November 15, 2014 by Nicolae Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496680 Share on other sites More sharing options...
Ch0cu3r Posted November 15, 2014 Share Posted November 15, 2014 but how to make index.php like this? What!!! Seriously you do not now how to do basic text file editing? Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496682 Share on other sites More sharing options...
tryingtolearn Posted November 15, 2014 Share Posted November 15, 2014 Are you looking for a way to prevent the folder list from appearing in the browser if someone types in a direct url to a plugin folder or include folder? Yes, you can just add a blank file called index.php and it will load instead of the folder list. The //silence is golden part is not needed. There may be more sophisticated ways of doing it but a blank file will work if its called index. Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496683 Share on other sites More sharing options...
Nicolae Posted November 15, 2014 Author Share Posted November 15, 2014 #5 by tryingtolearn, For example index in wordpress... has only 2 functions.. I think, I understant that this is impossible. i can do this only in case when i want to protect my folder. Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496685 Share on other sites More sharing options...
tryingtolearn Posted November 15, 2014 Share Posted November 15, 2014 Yes it would work it will simply display the blank page in the viewers browser instead of the file directory of that folder. Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496686 Share on other sites More sharing options...
Nicolae Posted November 15, 2014 Author Share Posted November 15, 2014 Ok.. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/292488-silence-is-golden-php/#findComment-1496687 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.