ecxod / debug
用于调试变量的包。
1.0.2
2024-07-30 21:07 UTC
Requires
- php: ^7.2|^7.4|^8.0|^8.2
- ext-json: *
- ecxod/funktionen: ^1.0
- twbs/bootstrap: *
This package is auto-updated.
Last update: 2024-09-30 21:29:52 UTC
README
在您的index.php文件末尾加载debug类
/** D E B U G */ if( isMe() ){ $oDEBUG = new D; echo $oDEBUG->debug($_SESSION['lang'], "UTF-8"); unset($oDEBUG); }
在您的scss文件中包含此内容
debug.scss
@charset "UTF-8"; /* ---------------------- DEBUG -------------------------*/ @media only print { div.debug, span.debug, pre.debug { display: none; visibility: hidden; } body.screen { width: 100%; } } @media only screen and (min-width:1400px) { :root { --screen: 1400px; --padding: 10px; --small-border-y: 3px; --small-border-x: 10px; --debug-top: 3px; --debug-right: 3px; --debug-width: 290px; --debug-width-max: 290px; } body.screen { width: VAR(--screen); } div.debug { position: fixed; top: VAR(--debug-top); right: VAR(--debug-right); height: CALC(100% - VAR(--small-border-y)); /* width: VAR(--debug-width); */ max-width: VAR(--debug-width-max); border: 1px solid #ddd; background-color: LightGoldenrodYellow; font-size: 0.8rem; } span.debug, pre.debug { font-size: 0.7rem; /* width: VAR(--debug-width); */ } form, i { /* margin-left: -27px; */ cursor: pointer; } }