Not quite sure what you are trying to do here !!!!
Maybe test a piece of code that will be called via AJAX ???
If you are getting the "file:///C:/Users/lakshmanan.palani/Downloads/servertime%20(22).php" then you are probably clicking on a file using explorer. THIS IS NOT THE WAY.
Open your browser, keyin
[localhost]
This is how you run a web page via the Apache server and PHP interpreter. Not by clicking on your file in explorer.
Additionally, undo all the changes you say you made to the configs, they are not necessary for the code you give as an example.
Also remove all the header() stuff and flush() they are also not required.