mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Move application directory to app
This commit is contained in:
parent
10d50a824e
commit
e609147fbc
@ -5,12 +5,12 @@ Message: <?= $message, "\n"; ?>
|
|||||||
Filename: <?= $exception->getFile(), "\n"; ?>
|
Filename: <?= $exception->getFile(), "\n"; ?>
|
||||||
Line Number: <?= $exception->getLine(); ?>
|
Line Number: <?= $exception->getLine(); ?>
|
||||||
|
|
||||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === true): ?>
|
||||||
|
|
||||||
Backtrace:
|
Backtrace:
|
||||||
<?php foreach ($exception->getTrace() as $error): ?>
|
<?php foreach ($exception->getTrace() as $error): ?>
|
||||||
<?php if (isset($error['file'])): ?>
|
<?php if (isset($error['file'])): ?>
|
||||||
<?= trim('-'. $error['line'] .' - '. $error['file'] .'::'. $error['function']) ."\n" ?>
|
<?= trim('-' . $error['line'] . ' - ' . $error['file'] . '::' . $error['function']) . "\n" ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
// On the CLI, we still want errors in productions
|
// On the CLI, we still want errors in productions
|
||||||
// so just use the exception template.
|
// so just use the exception template.
|
||||||
include __DIR__.'/error_exception.php';
|
include __DIR__ . '/error_exception.php';
|
@ -73,7 +73,7 @@
|
|||||||
<h1>404 - File Not Found</h1>
|
<h1>404 - File Not Found</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?php if (! empty($message) && $message != '(null)') : ?>
|
<?php if (! empty($message) && $message !== '(null)') : ?>
|
||||||
<?= esc($message) ?>
|
<?= esc($message) ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
Sorry! Cannot seem to find the page you were looking for.
|
Sorry! Cannot seem to find the page you were looking for.
|
@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
<title><?= htmlspecialchars($title, ENT_SUBSTITUTE, 'UTF-8') ?></title>
|
<title><?= htmlspecialchars($title, ENT_SUBSTITUTE, 'UTF-8') ?></title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'debug.css')) ?>
|
<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?= file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'debug.js') ?>
|
<?= file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.js') ?>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="init()">
|
<body onload="init()">
|
||||||
@ -19,10 +19,10 @@
|
|||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1><?= htmlspecialchars($title, ENT_SUBSTITUTE, 'UTF-8'), ($exception->getCode() ? ' #'.$exception->getCode() : '') ?></h1>
|
<h1><?= htmlspecialchars($title, ENT_SUBSTITUTE, 'UTF-8'), ($exception->getCode() ? ' #' . $exception->getCode() : '') ?></h1>
|
||||||
<p>
|
<p>
|
||||||
<?= $exception->getMessage() ?>
|
<?= $exception->getMessage() ?>
|
||||||
<a href="https://www.google.com/search?q=<?= urlencode($title.' '.preg_replace('#\'.*\'|".*"#Us', '', $exception->getMessage())) ?>"
|
<a href="https://www.google.com/search?q=<?= urlencode($title . ' ' . preg_replace('#\'.*\'|".*"#Us', '', $exception->getMessage())) ?>"
|
||||||
rel="noreferrer" target="_blank">search →</a>
|
rel="noreferrer" target="_blank">search →</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -64,14 +64,14 @@
|
|||||||
<!-- Trace info -->
|
<!-- Trace info -->
|
||||||
<?php if (isset($row['file']) && is_file($row['file'])) :?>
|
<?php if (isset($row['file']) && is_file($row['file'])) :?>
|
||||||
<?php
|
<?php
|
||||||
if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once']))
|
if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once']))
|
||||||
{
|
{
|
||||||
echo $row['function'].' '. static::cleanPath($row['file']);
|
echo $row['function'] . ' ' . static::cleanPath($row['file']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo static::cleanPath($row['file']).' : '.$row['line'];
|
echo static::cleanPath($row['file']) . ' : ' . $row['line'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
{PHP internal code}
|
{PHP internal code}
|
||||||
@ -79,9 +79,9 @@
|
|||||||
|
|
||||||
<!-- Class/Method -->
|
<!-- Class/Method -->
|
||||||
<?php if (isset($row['class'])) : ?>
|
<?php if (isset($row['class'])) : ?>
|
||||||
— <?= $row['class'].$row['type'].$row['function'] ?>
|
— <?= $row['class'] . $row['type'] . $row['function'] ?>
|
||||||
<?php if (! empty($row['args'])) : ?>
|
<?php if (! empty($row['args'])) : ?>
|
||||||
<?php $args_id = $error_id.'args'.$index ?>
|
<?php $args_id = $error_id . 'args' . $index ?>
|
||||||
( <a href="#" onclick="return toggle('<?= $args_id ?>');">arguments</a> )
|
( <a href="#" onclick="return toggle('<?= $args_id ?>');">arguments</a> )
|
||||||
<div class="args" id="<?= $args_id ?>">
|
<div class="args" id="<?= $args_id ?>">
|
||||||
<table cellspacing="0">
|
<table cellspacing="0">
|
||||||
@ -89,14 +89,14 @@
|
|||||||
<?php
|
<?php
|
||||||
$params = null;
|
$params = null;
|
||||||
// Reflection by name is not available for closure function
|
// Reflection by name is not available for closure function
|
||||||
if( substr( $row['function'], -1 ) !== '}' )
|
if (substr( $row['function'], -1 ) !== '}')
|
||||||
{
|
{
|
||||||
$mirror = isset( $row['class'] ) ? new \ReflectionMethod( $row['class'], $row['function'] ) : new \ReflectionFunction( $row['function'] );
|
$mirror = isset( $row['class'] ) ? new \ReflectionMethod( $row['class'], $row['function'] ) : new \ReflectionFunction( $row['function'] );
|
||||||
$params = $mirror->getParameters();
|
$params = $mirror->getParameters();
|
||||||
}
|
}
|
||||||
foreach ($row['args'] as $key => $value) : ?>
|
foreach ($row['args'] as $key => $value) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code><?= htmlspecialchars(isset($params[$key]) ? '$'.$params[$key]->name : "#$key", ENT_SUBSTITUTE, 'UTF-8') ?></code></td>
|
<td><code><?= htmlspecialchars(isset($params[$key]) ? '$' . $params[$key]->name : "#$key", ENT_SUBSTITUTE, 'UTF-8') ?></code></td>
|
||||||
<td><pre><?= print_r($value, true) ?></pre></td>
|
<td><pre><?= print_r($value, true) ?></pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
@ -129,7 +129,10 @@
|
|||||||
<!-- Server -->
|
<!-- Server -->
|
||||||
<div class="content" id="server">
|
<div class="content" id="server">
|
||||||
<?php foreach (['_SERVER', '_SESSION'] as $var) : ?>
|
<?php foreach (['_SERVER', '_SESSION'] as $var) : ?>
|
||||||
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) continue; ?>
|
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
} ?>
|
||||||
|
|
||||||
<h3>$<?= $var ?></h3>
|
<h3>$<?= $var ?></h3>
|
||||||
|
|
||||||
@ -148,7 +151,7 @@
|
|||||||
<?php if (is_string($value)) : ?>
|
<?php if (is_string($value)) : ?>
|
||||||
<?= htmlspecialchars($value, ENT_SUBSTITUTE, 'UTF-8') ?>
|
<?= htmlspecialchars($value, ENT_SUBSTITUTE, 'UTF-8') ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= '<pre>'.print_r($value, true) ?>
|
<?= '<pre>' . print_r($value, true) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -175,10 +178,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?= htmlspecialchars($key, ENT_IGNORE, 'UTF-8') ?></td>
|
<td><?= htmlspecialchars($key, ENT_IGNORE, 'UTF-8') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if (!is_array($value) && ! is_object($value)) : ?>
|
<?php if (! is_array($value) && ! is_object($value)) : ?>
|
||||||
<?= htmlspecialchars($value, ENT_SUBSTITUTE, 'UTF-8') ?>
|
<?= htmlspecialchars($value, ENT_SUBSTITUTE, 'UTF-8') ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= '<pre>'.print_r($value, true) ?>
|
<?= '<pre>' . print_r($value, true) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -229,7 +232,10 @@
|
|||||||
|
|
||||||
<?php $empty = true; ?>
|
<?php $empty = true; ?>
|
||||||
<?php foreach (['_GET', '_POST', '_COOKIE'] as $var) : ?>
|
<?php foreach (['_GET', '_POST', '_COOKIE'] as $var) : ?>
|
||||||
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) continue; ?>
|
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
} ?>
|
||||||
|
|
||||||
<?php $empty = false; ?>
|
<?php $empty = false; ?>
|
||||||
|
|
||||||
@ -247,10 +253,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><?= htmlspecialchars($key, ENT_IGNORE, 'UTF-8') ?></td>
|
<td><?= htmlspecialchars($key, ENT_IGNORE, 'UTF-8') ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if (!is_array($value) && ! is_object($value)) : ?>
|
<?php if (! is_array($value) && ! is_object($value)) : ?>
|
||||||
<?= htmlspecialchars($value, ENT_SUBSTITUTE, 'UTF-8') ?>
|
<?= htmlspecialchars($value, ENT_SUBSTITUTE, 'UTF-8') ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= '<pre>'.print_r($value, true) ?>
|
<?= '<pre>' . print_r($value, true) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -282,8 +288,14 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($headers as $name => $value) : ?>
|
<?php foreach ($headers as $name => $value) : ?>
|
||||||
<?php if (empty($value)) continue; ?>
|
<?php if (empty($value))
|
||||||
<?php if (! is_array($value)) { $value = [$value]; } ?>
|
{
|
||||||
|
continue;
|
||||||
|
} ?>
|
||||||
|
<?php if (! is_array($value))
|
||||||
|
{
|
||||||
|
$value = [$value];
|
||||||
|
} ?>
|
||||||
<?php foreach ($value as $h) : ?>
|
<?php foreach ($value as $h) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= esc($h->getName(), 'html') ?></td>
|
<td><?= esc($h->getName(), 'html') ?></td>
|
||||||
@ -306,7 +318,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 15em">Response Status</td>
|
<td style="width: 15em">Response Status</td>
|
||||||
<td><?= $response->getStatusCode().' - '.$response->getReason() ?></td>
|
<td><?= $response->getStatusCode() . ' - ' . $response->getReason() ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
<title>Whoops!</title>
|
<title>Whoops!</title>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'debug.css')) ?>
|
<?= preg_replace('#[\r\n\t ]+#', ' ', file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'debug.css')) ?>
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
Loading…
x
Reference in New Issue
Block a user