-
Notifications
You must be signed in to change notification settings - Fork 1
urls_error($doc=null, $str=null, $error=array(), $template="other", $code=500)
URLS Framework edited this page Jun 25, 2021
·
1 revision
Sets a custom error.
| Returns |
|---|
| void |
| Parameter | Default | Type | Required | Description |
|---|---|---|---|---|
| $doc | NULL | String | ❌ | The path and file to the document you want to use. |
| $str | NULL | Boolean | ❌ | The HTML you want to display when the error is called. |
| $error | array() | Array | ❌ | An array to pass variables to the error. |
| $template | "other" | String | ❌ | The URLS error template to use. |
| $code | 500 | Int | ❌ | The HTTP status code to set. |
<?php
if ($_ACCESS['page'] > 2) { ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My Blog - Home</title>
</head>
<body>
<h1>This is my Blog</h1>
<p>Welcome!</p>
</body>
</html>
<?php } else {
urls_error();
}
?>