You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ But that problem is easily fixed. Like Linux, Windows has the ability to create
41
41
42
42
### Testing
43
43
44
-
At the top of `httperror.php` you find this -
44
+
At the top of `/errpages/httperror.php` you find this -
45
45
46
46
```php
47
47
// uncomment for testing
@@ -50,6 +50,27 @@ define('_DEBUG', false);
50
50
51
51
Change `false` to `true` and "debug" will be active. You can then load the page from the server and a `404` error will be simulated.
52
52
53
+
#### Additional Testing
54
+
55
+
The `/testhttperror.php` file can be used for testing error codes. First set `_DEBUG` to `false` in `/errpages/httperror.php`, and then open `/testhttperror.php` in your edtior -
56
+
57
+
```php
58
+
<?php
59
+
// this script is for testing ./errpages/httperror.php, just
60
+
// change the code below
61
+
$testcode = 401;
62
+
// this just proves we can overwrite $_SERVER
63
+
$_SERVER['HTTPS'] = 'on';
64
+
$_SERVER['SERVER_PORT'] = 443;
65
+
// get the code to httperror.php...
66
+
putenv("REDIRECT_STATUS={$testcode}");
67
+
// test!
68
+
require_once './errpages/httperror.php';
69
+
?>
70
+
```
71
+
72
+
Just change `$testcode` to the error code you want to test. Then point your browser to `testhttperror.php`.
73
+
53
74
### Folder Junctions
54
75
55
76
You might be familiar with a Linux *hard link*. The Window's equivalent is a *junction*. And they are particularly useful when keeping project folders organized in separate and possibly unrelated locations but you want to serve them with XAMPP(*or MAMP*) during development.
This part `/tests/httperror` will need editing depending on how you set up the local server.
108
129
109
-
## Live
130
+
## It Lives!
110
131
111
132
Most internet web servers have a *common* location for website files. It's typically located at `/home/$USER/public_html`. Where **`$USER`** is the *user* that owns the `public_html` folder. Depending on your server's particular configuration that folder may be named differently or in a different location.
0 commit comments