PHP code display in browser instead of executing it – onlinecode

PHP code display in browser instead of executing it – onlinecode

In this post we will give you information about PHP code display in browser instead of executing it – onlinecode. Hear we will give you detail about PHP code display in browser instead of executing it – onlinecodeAnd how to use it also give you demo for it if it is necessary.

Sometime you are tring to execute some PHP code or try to open phpmyadmin in your local system then it show you php script instead of executed.


Solution 1 :

First run php -v from command line to know if it return PHP version or any errors to make sure PHP is installed properly or not in your system.

If you don’t have PHP installed then install PHP first in this case :

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

If you have PHP installed but it is not enabled then enable by running following command :


sudo a2enmod php5  
sudo service apache2 restart 


If you have PHP installed and enabled both then restart your apache server by running following command:

sudo service apache2 restart


Solution 2 :

It might be PHP is not enabled in your apache configuration.

You can uncomment PHP module by removing ‘#’ sign at the beginning from httpd.conf file. Save file and then restart the web server.

Short tags are now deprecated so please make sure you are not using short tags in the PHP file.

Hope this code and post will helped you for implement PHP code display in browser instead of executing it – onlinecode. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

67  +    =  69

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US