|
6 | 6 | I'm new to this live-server thing. I have used it for *`.html`* pages, and it worked flawlessly! But now, when I want to use it for php pages, it downloads the .php file instead of executing it. |
7 | 7 |
|
8 | 8 | **Answer:** |
9 | | -1. [The Common Misconceptions](#the-common-misconceptions) |
| 9 | +1. [The Common Misconceptions](#the-common-misconception) |
10 | 10 | 2. You will need to install a server on your machine or download the necessary requirements. Here is a Stackoverflow question: [PHP server on local machine?](https://stackoverflow.com/questions/1678010/php-server-on-local-machine) |
11 | 11 | + [PHP](http://php.net/downloads.php) (just the preprocessor without apache) |
12 | 12 | + [XAMPP](https://www.apachefriends.org/index.html) (cross-platform) |
13 | 13 | + [MAMP](https://www.mamp.info/en/downloads/) (mac) |
14 | 14 | + [WAMP](http://www.wampserver.com/en/) (windows) |
15 | 15 | 3. Visit the ***Actual Server Address***: `http://localhost:[port_number]/[workspace]`, not the VS Code extension's ***Live Server Address***: `http://127.0.0.1:5500/` |
16 | 16 |
|
17 | | -<br><br><hr> |
| 17 | +<br><br><hr><br> |
| 18 | + |
| 19 | +### Why do I have to run a separate server |
| 20 | +Hi, I wonder why I have to run my own server when the vscode extension will start one at: `http://127.0.0.1:5500/`, when I go live? |
18 | 21 |
|
19 | | ->## The Common Misconceptions |
20 | | ->Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `.NET` or `NodeJS`. It will give you the *reloading function*, so you do not need to refresh the page every time you save. |
| 22 | +**Answer:** |
| 23 | +The two main reasons are the flexibility, and the complexity of server-side environment. |
| 24 | +For instance, in order to be able to use this add-on in all environments and not to |
| 25 | +prevent the user from a specific php verion, or running Apache with PHP. |
| 26 | +It is therefore preferable that the user can decide for yourself which environment to use. |
| 27 | +Another thing is that the server side is heavier than the client side because it needs a |
| 28 | +larger server environment to run- and preprocess your code in PHP, NodeJS or .NET. |
| 29 | + |
| 30 | +<br><br><hr> |
| 31 | +>## The Common Misconception |
| 32 | +>Neither the browser add-on nor the VS Code extension will host a server for: `PHP`, `.NET` or `NodeJS`. |
| 33 | +This add-on will give you the *reloading function*, so you do not need to refresh the webpage every time you save. |
21 | 34 | > |
22 | | ->The reason I built this browser add-on is to delight the experience of server-side programming. The server-side is heavier than the client-side because it needs a larger server environment to run and preprocess your code in: `PHP`, `NodeJS` or `.NET`. |
| 35 | +>The reason I built this browser add-on is to delight the experience of server-side programming. |
| 36 | +The server-side is heavier than the client-side because it needs a larger server environment to |
| 37 | +run and preprocess your code in: `PHP`, `NodeJS` or `.NET`. |
0 commit comments