Page 2 of 2

Re: Php code is showing in browser instead of executing

PostPosted: 03. January 2019 09:28
by Altrea
Search for and follow the steps to how to unhide the known extensions related to your operating system
http://lmgtfy.com/?q=unhide+extensions+ ... file+types

Then remove the unwanted file extention by renaming the file.

Last step use a better editor to create and edit your php files.

Re: Php code is showing in browser instead of executing

PostPosted: 03. January 2019 11:41
by delrashmi
i changed my file extension & now my code is not displaying on browser,but when i use following code....<?php echo"hello"; ?> ,browser left blank ie hello is not printing on my browser.

Re: Php code is showing in browser instead of executing

PostPosted: 03. January 2019 12:01
by Altrea
What is the output of your browsers source code view at the moment you get a blank screen?

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 05:38
by delrashmi
it shows me the php code while the browser screen is blank

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 12:12
by Nobbie
You probably are still using wrong file extension.

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 12:18
by delrashmi
no this time i am sure ,also my file is showing as php file but when i execute it -browser screen remains white without showing anything.

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 12:28
by Nobbie
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.

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 13:56
by delrashmi
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.

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 14:04
by Altrea
can you send us the php file?

There must be something wrong with it or it's code or the way how you access it.
And with the information you provided us it is not possible to identify this issue.

Re: Php code is showing in browser instead of executing

PostPosted: 04. January 2019 14:28
by Nobbie
delrashmi wrote: and when i tried to execute it


This is still a bad description. Do not use "try to execute", i have no idea what you mean by that. Please explain fully and precisely, what you are doing. Each mouseclick, every keystroke!

Re: Php code is showing in browser instead of executing

PostPosted: 05. January 2019 08:16
by delrashmi
my php code is-<?php echo"hello"; ?> & have saved it as test.php in htdocs folder.Now in browser i enter url as-localhost/test.php & it shows me blank screen of browser

Re: Php code is showing in browser instead of executing

PostPosted: 05. January 2019 08:42
by Altrea
In my test environment it is working as expected. My test.php file echoes the word hello instead of a full white page.
My source code view contains only the word hello, no php code.

I'm out. I cannot help you. I don't know your XAMPP configuration, i don't know your php file and i have no possibilities to analyse and test it myself.

Re: Php code is showing in browser instead of executing

PostPosted: 05. January 2019 08:44
by delrashmi
Ok...not an issue thanks for ur comments/suggestions.