Php Files Not Working When Using Bootstrap
Solution 1:
I think You simply missing the point:
After reading your question I think you just put the project files directly into the www directory of wamp. so obesely that not gone work. Also, you mention that in index.html your PHP code is not working is also obvious error that to run a PHP code you need to give that file a .php extension.
In order to run PHP file in wamp server where should I save the files in Bootstrap or in Wamp?
To run a PHP file with WAMP you need to follow this basic step:
Install Wamp: Here is the all related detail about
WAMPand you could download it and install on your local drive. wampserverAfter installing it go to the WAMP directory and find
WWWthis is the place where you can put your projects in.Now Simply Create your project folder. i.e
test_projectWAMP/WWW/test_projectNow inside this project folder, you can add your project
bootstraptemplate and yourindex.php. After reading your question I think you just put the project template files intowwwdirectory so please change that.Now to open this
index.phpyou can go to your browser and typelocalhost/test_project. This will automatically run anindex.phpfile of your project.
Solution 2:
In order to process php, the file needs to have a .php extension and you would store it in your webroot which is the same place you keep the .html files.
If your php isn't running, you either have a php error or your webserver isn't configured properly to process php files.
Solution 3:
You need to change your extension `.html` to `.php`
If you still want to serve php files as .html create an .htaccess file in
in your directory and
`AddType application/x-httpd-php .html .htm`
it will start working
Solution 4:
You must save your file with ".php" extension (like "test.php") and save it in your wamp server folder : "c:\wamp\www". Run your php file in browser : localhost/test.php. Hope this help you bro.
Post a Comment for "Php Files Not Working When Using Bootstrap"