-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 🎨 split files (and more refactoring)
- split the single php file in multiple files. - update readme ( file->folder, new screenshot, ideas section) - add php unit tests (for file-parsing) with test data. - add phpcs with coding standards (PSR12). - add travis support. This is no longer a single-file gui! The path for the viewer changed, you no longer open http://example.com/php-error-log-viewer/php-error-log-viewer.php but https://examle.com/php-error-log-viewer/
- Loading branch information
Showing
16 changed files
with
710 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
vendor/ | ||
|
||
composer.lock | ||
.phpunit.result.cache | ||
*.code-workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* PHP Error Log Viewer. | ||
* Check readme.md for more information. | ||
* | ||
* Disclaimer | ||
* - This contains code for reading & deleting your log-file. | ||
* - Log files might contain sensitive information. | ||
* - It is meant for development-environments | ||
*/ | ||
|
||
namespace Php_Error_Log_Viewer; | ||
|
||
require_once 'src/LogHandler.php'; | ||
require_once 'src/AjaxHandler.php'; | ||
|
||
$path = 'php-error-log-viewer.ini'; | ||
// search settings directly outside the vendor folder. | ||
$settings = file_exists('../../' . $path) ? parse_ini_file('../../' . $path) : array(); | ||
// search settings in the same folder as the file. | ||
$settings = file_exists($path) ? parse_ini_file($path) : $settings; | ||
|
||
$log_handler = new LogHandler($settings); | ||
$ajax_handler = new AjaxHandler($log_handler); | ||
$ajax_handler->handle_ajax_requests(); | ||
|
||
readfile('./src/error-log-viewer-frontend.html'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.