File: local-web-setup.md

package info (click to toggle)
php-doc 20250827~git.abe740d%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 71,968 kB
  • sloc: xml: 985,760; php: 25,504; javascript: 671; sh: 177; makefile: 37
file content (32 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Setting up a local web development enviroment

## Clone the php.net sources
```
$ git clone https://github.com/php/web-php.git
```

## Symlink (or move) the generated PHP documentation to your local php.net sources
```
$ cd web-php/manual
$ rm -rf en
$ ln -s ../../output/php-web en
```

Symlinking can also be done on Windows. Just make sure you run `cmd` as an *Administrator*.

```
$ cd \your\path\to\web-php\manual\
$ rmdir /S en
$ mklink /D en \your\path\to\output\web-php
```

## Run a webserver
We are going to use PHP's built-in web server. Please open another terminal instance for this task.

```
$ cd phpdoc/web-php
$ php -S localhost:8080 .router.php
```

## View the new site
Open [http://localhost:8080/manual/en/](http://localhost:8080/manual/en/) in your browser.