How do you enter the file name into your browser? Something is wrong with your description, you said you entered test.php into your browser, while the file name was test.php.txt, that would lead to error 404 or 403 not found.

We cannot help you if dont tell how you are executing test.php. I assume that you simply double click in explorer on the file test.php, but you do not tell us so.

Let me explain the whole scenario from beginning.....at first i create a php file (test.php) but it was saved as test.php.txt and when i tried to execute it ,it shows me the php code in browser but now i changed the file type of same file & now its showing me as php file.Now at this time when i tried to open the same file (saved as test.php in htdocs) as-localhost/test.php it shows me the blank browser page.