Skip to content Skip to sidebar Skip to footer

Php Files Not Working When Using Bootstrap

I am new to Programming hence need some help. Below is the code I am using for a Contact Form using Bootstrap but my PHP code doesn't seem to work. I have been keeping 'index.php'

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:


  1. Install Wamp: Here is the all related detail about WAMP and you could download it and install on your local drive. wampserver

  2. After installing it go to the WAMP directory and find WWW this is the place where you can put your projects in.

  3. Now Simply Create your project folder. i.e test_projectWAMP/WWW/test_project

  4. Now inside this project folder, you can add your project bootstrap template and your index.php. After reading your question I think you just put the project template files into www directory so please change that.

  5. Now to open this index.php you can go to your browser and type localhost/test_project. This will automatically run an index.php file 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"