CodeLens — Kodeviser
index.php
PHP 24,244 bytes
<?php
/**
 * CodeLens - Tiny File Manager (Uten login)
 * Basert på h3k-tiny-file-manager for fargekodet visning
 */

// ====== KONFIGURASJON ======
$root_path = __DIR__;
$use_auth = false; // Ingen innlogging
$theme = 'dark';

// Root path
$root_path = rtrim($root_path, '\\/');
$root_path = str_replace('\\', '/', $root_path);

// Highlight.js for fargekoding
$use_highlightjs = true;
$highlightjs_style = 'ir-black'; // Dark theme for kode

// ====== HENT PATH ======
$p = isset($_GET['p']) ? $_GET['p'] : '';
$p = str_replace(array('../', '..\\'), '', $p);
$p = trim($p, '/');

// ====== VIS FIL INNHOLD ======
if (isset($_GET['view'])) {
    $file = $_GET['view'];
    $file = str_replace(array('../', '..\\'), '', $file);
    $file = trim($file, '/');
    
    $full_path = $root_path . '/' . $file;
    
    if (file_exists($full_path) && is_file($full_path)) {
        $content = file_get_contents($full_path);
        $ext = strtolower(pathinfo($full_path, PATHINFO_EXTENSION));
        $filename = basename($file);
        
        // Vis siden med fargekoding
        show_code_viewer($filename, $content, $ext);
        exit;
    }
}

// ====== HENT FILER OG MAPPER ======
$current_path = $root_path . ($p ? '/' . $p : '');
$items = [];

if (is_dir($current_path)) {
    $scandir = scandir($current_path);
    foreach ($scandir as $item) {
        if ($item == '.' || $item == '..') continue;
        if ($item == 'assets' || $item == 'data') continue; // Skjul systemmapper
        $full_path = $current_path . '/' . $item;
        $items[] = [
            'name' => $item,
            'is_dir' => is_dir($full_path),
            'size' => is_file($full_path) ? filesize($full_path) : 0,
            'mtime' => is_file($full_path) ? filemtime($full_path) : 0,
            'ext' => is_file($full_path) ? strtolower(pathinfo($full_path, PATHINFO_EXTENSION)) : ''
        ];
    }
    usort($items, function($a, $b) {
        if ($a['is_dir'] && !$b['is_dir']) return -1;
        if (!$a['is_dir'] && $b['is_dir']) return 1;
        return strcasecmp($a['name'], $b['name']);
    });
}

// Hent foreldremappe
$parent = '';
if ($p) {
    $parts = explode('/', $p);
    array_pop($parts);
    $parent = implode('/', $parts);
}

// ====== FUNKSJONER ======
function show_code_viewer($filename, $content, $ext) {
    global $highlightjs_style;
    ?>
    <!DOCTYPE html>
    <html lang="no">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>CodeLens - <?php echo htmlspecialchars($filename); ?></title>
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/<?php echo $highlightjs_style; ?>.min.css">
        <style>
            body {
                background: #1a1a2e;
                color: #e0e0e0;
                min-height: 100vh;
            }
            .code-header {
                background: #16213e;
                padding: 15px 25px;
                border-bottom: 2px solid #2a2a4a;
                display: flex;
                justify-content: space-between;
                align-items: center;
                flex-wrap: wrap;
            }
            .code-header .brand {
                color: #e94560;
                font-size: 1.3rem;
                font-weight: bold;
            }
            .code-header .brand span {
                color: #53d8fb;
                font-weight: 300;
                font-size: 0.9rem;
            }
            .code-header .nav-links {
                display: flex;
                gap: 10px;
            }
            .code-header .nav-links a {
                color: #c4c4d4;
                text-decoration: none;
                padding: 6px 15px;
                border-radius: 6px;
                transition: all 0.3s;
                font-size: 0.9rem;
            }
            .code-header .nav-links a:hover {
                background: #2a3a5e;
                color: #fff;
            }
            .code-container {
                padding: 20px;
                max-width: 1400px;
                margin: 0 auto;
            }
            .file-info {
                background: #16213e;
                border-radius: 8px;
                padding: 12px 20px;
                margin-bottom: 15px;
                border: 1px solid #2a2a4a;
                display: flex;
                justify-content: space-between;
                align-items: center;
                flex-wrap: wrap;
            }
            .file-info .name {
                color: #e94560;
                font-size: 1.1rem;
            }
            .file-info .meta {
                color: #75715e;
                font-size: 0.85rem;
            }
            .file-info .meta i {
                margin-right: 5px;
            }
            pre {
                background: #0d0d1a !important;
                border-radius: 12px !important;
                border: 1px solid #2a2a4a !important;
                padding: 20px !important;
                max-height: 70vh;
                overflow: auto;
                margin: 0 !important;
            }
            pre code {
                font-family: 'Courier New', monospace;
                font-size: 0.9rem;
                line-height: 1.8;
            }
            .actions {
                display: flex;
                gap: 10px;
                margin-top: 15px;
                flex-wrap: wrap;
            }
            .actions .btn {
                padding: 8px 20px;
                border-radius: 6px;
                text-decoration: none;
                font-size: 0.9rem;
                transition: all 0.3s;
                border: 1px solid #2a2a4a;
                background: #16213e;
                color: #c4c4d4;
            }
            .actions .btn:hover {
                background: #2a3a5e;
                color: #fff;
            }
            .actions .btn-primary {
                border-color: #e94560;
                color: #e94560;
            }
            .actions .btn-primary:hover {
                background: #e94560;
                color: #fff;
            }
            .actions .btn-success {
                border-color: #53d8fb;
                color: #53d8fb;
            }
            .actions .btn-success:hover {
                background: #53d8fb;
                color: #1a1a2e;
            }
            ::-webkit-scrollbar { width: 6px; background: #0d0d1a; }
            ::-webkit-scrollbar-thumb { background: #3a4a6e; border-radius: 8px; }
            ::-webkit-scrollbar-thumb:hover { background: #5a7a9a; }
            
            @media (max-width: 768px) {
                .code-header { flex-direction: column; gap: 10px; align-items: flex-start; }
                .code-container { padding: 10px; }
                .file-info { flex-direction: column; gap: 5px; align-items: flex-start; }
                pre code { font-size: 0.8rem; }
            }
        </style>
    </head>
    <body>
        <div class="code-header">
            <div class="brand">
                <i class="fa fa-code"></i> CodeLens
                <span>— Kodeviser</span>
            </div>
            <div class="nav-links">
                <a href="index.php"><i class="fa fa-folder-open"></i> Filbehandler</a>
                <a href="learn/index.html"><i class="fa fa-graduation-cap"></i> Lær</a>
            </div>
        </div>
        
        <div class="code-container">
            <div class="file-info">
                <div class="name">
                    <i class="fa fa-file-code-o"></i> <?php echo htmlspecialchars($filename); ?>
                </div>
                <div class="meta">
                    <i class="fa fa-tag"></i> <?php echo strtoupper($ext); ?>
                    <span style="margin-left: 15px;"><i class="fa fa-database"></i> <?php echo number_format(strlen($content)); ?> bytes</span>
                </div>
            </div>
            
            <pre><code class="language-<?php echo $ext; ?>"><?php echo htmlspecialchars($content); ?></code></pre>
            
            <div class="actions">
                <a href="index.php?p=<?php echo urlencode(dirname($file)); ?>" class="btn">
                    <i class="fa fa-arrow-left"></i> Tilbake
                </a>
                <a href="?view=<?php echo urlencode($file); ?>&raw=1" class="btn btn-primary" target="_blank">
                    <i class="fa fa-external-link"></i> Åpne raw
                </a>
                <button class="btn btn-success" onclick="copyCode()">
                    <i class="fa fa-copy"></i> Kopier kode
                </button>
                <a href="learn/index.html" class="btn" style="border-color: #fd971f; color: #fd971f;">
                    <i class="fa fa-graduation-cap"></i> Gå til læring
                </a>
            </div>
        </div>
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
        <script>
            // Auto-detect språk
            document.addEventListener('DOMContentLoaded', (event) => {
                document.querySelectorAll('pre code').forEach((block) => {
                    hljs.highlightElement(block);
                });
            });
            
            function copyCode() {
                const code = document.querySelector('pre code');
                if (!code) return;
                const text = code.textContent;
                navigator.clipboard.writeText(text).then(() => {
                    alert('Kode kopiert!');
                }).catch(() => {
                    const textarea = document.createElement('textarea');
                    textarea.value = text;
                    document.body.appendChild(textarea);
                    textarea.select();
                    document.execCommand('copy');
                    textarea.remove();
                    alert('Kode kopiert!');
                });
            }
        </script>
    </body>
    </html>
    <?php
    exit;
}

// ====== VIS FILBEHANDLER ======
?>
<!DOCTYPE html>
<html lang="no">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CodeLens - Filbehandler</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        body {
            background: #1a1a2e;
            color: #e0e0e0;
            min-height: 100vh;
        }
        
        /* Header */
        .codelens-header {
            background: #16213e;
            padding: 12px 25px;
            border-bottom: 2px solid #2a2a4a;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }
        .codelens-header .brand {
            color: #e94560;
            font-size: 1.4rem;
            font-weight: bold;
        }
        .codelens-header .brand span {
            color: #53d8fb;
            font-weight: 300;
            font-size: 0.9rem;
        }
        .codelens-header .nav-links {
            display: flex;
            gap: 10px;
        }
        .codelens-header .nav-links a {
            color: #c4c4d4;
            text-decoration: none;
            padding: 6px 15px;
            border-radius: 6px;
            transition: all 0.3s;
            font-size: 0.9rem;
        }
        .codelens-header .nav-links a:hover {
            background: #2a3a5e;
            color: #fff;
        }
        .codelens-header .nav-links a.active {
            background: #2a3a5e;
            color: #e94560;
        }
        
        .container-main {
            padding: 20px;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        /* Quick Links */
        .quick-links {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        .quick-link {
            background: #16213e;
            border-radius: 10px;
            padding: 15px;
            border: 1px solid #2a2a4a;
            text-align: center;
            transition: all 0.3s;
            text-decoration: none;
            color: #e0e0e0;
        }
        .quick-link:hover {
            transform: translateY(-3px);
            border-color: #e94560;
            box-shadow: 0 8px 25px rgba(233, 69, 96, 0.2);
        }
        .quick-link .icon { font-size: 2rem; margin-bottom: 5px; }
        .quick-link .label { font-size: 0.9rem; }
        .quick-link .html-icon { color: #e94560; }
        .quick-link .css-icon { color: #53d8fb; }
        .quick-link .js-icon { color: #fd971f; }
        
        /* File Manager */
        .file-manager {
            background: #16213e;
            border-radius: 12px;
            border: 1px solid #2a2a4a;
            overflow: hidden;
        }
        .file-manager-header {
            background: #0d0d1a;
            padding: 12px 20px;
            border-bottom: 1px solid #2a2a4a;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }
        .file-manager-header h6 {
            color: #53d8fb;
            margin: 0;
            font-weight: 300;
        }
        
        .breadcrumb-custom {
            padding: 10px 20px;
            border-bottom: 1px solid #2a2a4a;
            color: #c4c4d4;
            font-size: 0.9rem;
        }
        .breadcrumb-custom a {
            color: #53d8fb;
            text-decoration: none;
        }
        .breadcrumb-custom a:hover {
            color: #e94560;
        }
        
        .file-list {
            padding: 15px;
            max-height: 55vh;
            overflow-y: auto;
        }
        .file-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 12px;
            border-radius: 6px;
            transition: all 0.2s;
            cursor: pointer;
            text-decoration: none;
            color: #e0e0e0;
        }
        .file-item:hover {
            background: #2a3a5e;
        }
        .file-item .file-icon {
            width: 32px;
            height: 32px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            flex-shrink: 0;
        }
        .file-item .file-icon.folder { background: #2a3a5e; color: #53d8fb; }
        .file-item .file-icon.html { background: #e94560; color: #fff; }
        .file-item .file-icon.css { background: #53d8fb; color: #1a1a2e; }
        .file-item .file-icon.js { background: #fd971f; color: #1a1a2e; }
        .file-item .file-icon.php { background: #a6e22e; color: #1a1a2e; }
        .file-item .file-icon.txt { background: #75715e; color: #fff; }
        .file-item .file-icon.md { background: #66d9ef; color: #1a1a2e; }
        
        .file-item .file-info { flex: 1; }
        .file-item .file-info .name { font-size: 0.95rem; }
        .file-item .file-info .meta { font-size: 0.75rem; color: #75715e; }
        
        .file-item .file-actions { display: flex; gap: 6px; }
        .file-item .file-actions a {
            color: #75715e;
            transition: all 0.2s;
            padding: 2px 6px;
            border-radius: 4px;
            text-decoration: none;
        }
        .file-item .file-actions a:hover {
            color: #53d8fb;
            background: #2a3a5e;
        }
        
        .empty-folder {
            text-align: center;
            padding: 40px 0;
            color: #75715e;
        }
        .empty-folder i {
            font-size: 3rem;
            display: block;
            margin-bottom: 10px;
        }
        
        ::-webkit-scrollbar { width: 6px; background: #0d0d1a; }
        ::-webkit-scrollbar-thumb { background: #3a4a6e; border-radius: 8px; }
        ::-webkit-scrollbar-thumb:hover { background: #5a7a9a; }
        
        @media (max-width: 768px) {
            .codelens-header { flex-direction: column; gap: 10px; align-items: flex-start; }
            .container-main { padding: 10px; }
            .file-manager-header { flex-direction: column; gap: 8px; align-items: flex-start; }
            .file-item { flex-wrap: wrap; }
            .file-item .file-actions { margin-left: auto; }
        }
    </style>
</head>
<body>

    <!-- Header -->
    <header class="codelens-header">
        <div class="brand">
            <i class="fa fa-code"></i> CodeLens
            <span>— Filbehandler</span>
        </div>
        <div class="nav-links">
            <a href="learn/index.html"><i class="fa fa-graduation-cap"></i> Lær</a>
            <a href="index.php" class="active"><i class="fa fa-folder-open"></i> Filer</a>
        </div>
    </header>

    <!-- Hovedinnhold -->
    <div class="container-main">

        <!-- Hurtigkoblinger -->
        <div class="quick-links">
            <a href="learn/html.html" class="quick-link">
                <div class="icon html-icon"><i class="fa fa-html5"></i></div>
                <div class="label" style="color: #e94560;">Lær HTML</div>
            </a>
            <a href="learn/css.html" class="quick-link">
                <div class="icon css-icon"><i class="fa fa-css3"></i></div>
                <div class="label" style="color: #53d8fb;">Lær CSS</div>
            </a>
            <a href="learn/js.html" class="quick-link">
                <div class="icon js-icon"><i class="fa fa-code"></i></div>
                <div class="label" style="color: #fd971f;">Lær JavaScript</div>
            </a>
            <a href="learn/index.html" class="quick-link">
                <div class="icon" style="color: #e94560;"><i class="fa fa-graduation-cap"></i></div>
                <div class="label" style="color: #53d8fb;">Læringsportal</div>
            </a>
        </div>

        <!-- Filbehandler -->
        <div class="file-manager">
            <div class="file-manager-header">
                <h6><i class="fa fa-folder-open"></i> Filbehandler</h6>
                <div style="display: flex; gap: 8px; align-items: center;">
                    <span style="font-size: 0.8rem; color: #75715e;">
                        <i class="fa fa-database"></i> <?php echo count($items); ?> elementer
                    </span>
                    <a href="index.php" class="btn btn-sm" style="color: #53d8fb; border: 1px solid #2a2a4a; border-radius: 4px; padding: 2px 10px; text-decoration: none;">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>
            </div>
            
            <!-- Breadcrumb -->
            <div class="breadcrumb-custom">
                <i class="fa fa-home"></i>
                <a href="?p=">Hjem</a>
                <?php
                if ($p) {
                    $parts = explode('/', $p);
                    $cumulative = '';
                    foreach ($parts as $part) {
                        $cumulative .= ($cumulative ? '/' : '') . $part;
                        echo ' / <a href="?p=' . urlencode($cumulative) . '">' . htmlspecialchars($part) . '</a>';
                    }
                }
                ?>
            </div>
            
            <div class="file-list">
                <?php if ($parent !== ''): ?>
                <a href="?p=<?php echo urlencode($parent); ?>" class="file-item">
                    <div class="file-icon folder"><i class="fa fa-chevron-left"></i></div>
                    <div class="file-info">
                        <div class="name">..</div>
                        <div class="meta">Gå tilbake</div>
                    </div>
                </a>
                <?php endif; ?>
                
                <?php if (empty($items)): ?>
                <div class="empty-folder">
                    <i class="fa fa-folder-open"></i>
                    Mappen er tom
                </div>
                <?php endif; ?>
                
                <?php foreach ($items as $item): ?>
                <?php if ($item['is_dir']): ?>
                <a href="?p=<?php echo urlencode($p ? $p . '/' . $item['name'] : $item['name']); ?>" class="file-item">
                    <div class="file-icon folder"><i class="fa fa-folder"></i></div>
                    <div class="file-info">
                        <div class="name"><?php echo htmlspecialchars($item['name']); ?></div>
                        <div class="meta">Mappe</div>
                    </div>
                </a>
                <?php else: 
                    $icon_class = 'txt';
                    $icon_name = 'fa-file-text-o';
                    if ($item['ext'] == 'html' || $item['ext'] == 'htm') { $icon_class = 'html'; $icon_name = 'fa-html5'; }
                    elseif ($item['ext'] == 'css') { $icon_class = 'css'; $icon_name = 'fa-css3'; }
                    elseif ($item['ext'] == 'js') { $icon_class = 'js'; $icon_name = 'fa-code'; }
                    elseif ($item['ext'] == 'php') { $icon_class = 'php'; $icon_name = 'fa-code'; }
                    elseif ($item['ext'] == 'md') { $icon_class = 'md'; $icon_name = 'fa-file-text-o'; }
                ?>
                <div class="file-item">
                    <div class="file-icon <?php echo $icon_class; ?>">
                        <i class="fa <?php echo $icon_name; ?>"></i>
                    </div>
                    <div class="file-info">
                        <div class="name"><?php echo htmlspecialchars($item['name']); ?></div>
                        <div class="meta">
                            <?php echo number_format($item['size']); ?> bytes • 
                            <?php echo date('Y-m-d H:i', $item['mtime']); ?>
                        </div>
                    </div>
                    <div class="file-actions">
                        <a href="?view=<?php echo urlencode($p ? $p . '/' . $item['name'] : $item['name']); ?>" title="Vis kode med farger">
                            <i class="fa fa-eye"></i>
                        </a>
                        <a href="<?php echo htmlspecialchars($p ? $p . '/' . $item['name'] : $item['name']); ?>" target="_blank" title="Åpne raw">
                            <i class="fa fa-external-link"></i>
                        </a>
                    </div>
                </div>
                <?php endif; ?>
                <?php endforeach; ?>
            </div>
        </div>
        
        <!-- Info om fargekoding -->
        <div style="margin-top: 20px; background: #16213e; border-radius: 12px; border: 1px solid #2a2a4a; padding: 15px 20px;">
            <div style="display: flex; flex-wrap: wrap; gap: 15px; font-size: 0.85rem; color: #c4c4d4;">
                <span><i class="fa fa-info-circle" style="color: #53d8fb;"></i> Klikk <strong style="color: #e94560;">👁️ Vis</strong> på en fil for å se koden med Notepad++-farger</span>
                <span><span style="color: #f92672;">■</span> Tags</span>
                <span><span style="color: #a6e22e;">■</span> Attributes</span>
                <span><span style="color: #e6db74;">■</span> Values</span>
                <span><span style="color: #66d9ef;">■</span> Keywords</span>
                <span><span style="color: #fd971f;">■</span> Variables</span>
                <span><span style="color: #75715e;">■</span> Kommentarer</span>
            </div>
        </div>
    </div>

</body>
</html>
( ! ) Warning: Undefined variable $file in C:\wamp64\www\php.karimy.no\tools\codelens1\index.php on line 246 Call Stack #TimeMemoryFunctionLocation 10.0003362544{main}( )...\index.php:0 20.0010387824show_code_viewer( $filename = 'index.php', $content = '<?php\n/**\n * CodeLens - Tiny File Manager (Uten login)\n * Basert på h3k-tiny-file-manager for fargekodet visning\n */\n\n// ====== KONFIGURASJON ======\n$root_path = __DIR__;\n$use_auth = false; // Ingen innlogging\n$theme = \'dark\';\n\n// Root path\n$root_path = rtrim($root_path, \'\\\\/\');\n$root_path = str_replace(\'\\\\\', \'/\', $root_path);\n\n// Highlight.js for fargekoding\n$use_highlightjs = true;\n$highlightjs_style = \'ir-black\'; // Dark theme for kode\n\n// ====== HENT PATH ======\n$p = isset($_GET[\'p\']) ? $_GET[\'p\'] : \'\''..., $ext = 'php' )...\index.php:39
( ! ) Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in C:\wamp64\www\php.karimy.no\tools\codelens1\index.php on line 246
Call Stack
#TimeMemoryFunctionLocation
10.0003362544{main}( )...\index.php:0
20.0010387824show_code_viewer( $filename = 'index.php', $content = '<?php\n/**\n * CodeLens - Tiny File Manager (Uten login)\n * Basert på h3k-tiny-file-manager for fargekodet visning\n */\n\n// ====== KONFIGURASJON ======\n$root_path = __DIR__;\n$use_auth = false; // Ingen innlogging\n$theme = \'dark\';\n\n// Root path\n$root_path = rtrim($root_path, \'\\\\/\');\n$root_path = str_replace(\'\\\\\', \'/\', $root_path);\n\n// Highlight.js for fargekoding\n$use_highlightjs = true;\n$highlightjs_style = \'ir-black\'; // Dark theme for kode\n\n// ====== HENT PATH ======\n$p = isset($_GET[\'p\']) ? $_GET[\'p\'] : \'\''..., $ext = 'php' )...\index.php:39
30.0049413560dirname( $path = NULL )...\index.php:246
" class="btn"> Tilbake
( ! ) Warning: Undefined variable $file in C:\wamp64\www\php.karimy.no\tools\codelens1\index.php on line 249 Call Stack #TimeMemoryFunctionLocation 10.0003362544{main}( )...\index.php:0 20.0010387824show_code_viewer( $filename = 'index.php', $content = '<?php\n/**\n * CodeLens - Tiny File Manager (Uten login)\n * Basert på h3k-tiny-file-manager for fargekodet visning\n */\n\n// ====== KONFIGURASJON ======\n$root_path = __DIR__;\n$use_auth = false; // Ingen innlogging\n$theme = \'dark\';\n\n// Root path\n$root_path = rtrim($root_path, \'\\\\/\');\n$root_path = str_replace(\'\\\\\', \'/\', $root_path);\n\n// Highlight.js for fargekoding\n$use_highlightjs = true;\n$highlightjs_style = \'ir-black\'; // Dark theme for kode\n\n// ====== HENT PATH ======\n$p = isset($_GET[\'p\']) ? $_GET[\'p\'] : \'\''..., $ext = 'php' )...\index.php:39
( ! ) Deprecated: urlencode(): Passing null to parameter #1 ($string) of type string is deprecated in C:\wamp64\www\php.karimy.no\tools\codelens1\index.php on line 249
Call Stack
#TimeMemoryFunctionLocation
10.0003362544{main}( )...\index.php:0
20.0010387824show_code_viewer( $filename = 'index.php', $content = '<?php\n/**\n * CodeLens - Tiny File Manager (Uten login)\n * Basert på h3k-tiny-file-manager for fargekodet visning\n */\n\n// ====== KONFIGURASJON ======\n$root_path = __DIR__;\n$use_auth = false; // Ingen innlogging\n$theme = \'dark\';\n\n// Root path\n$root_path = rtrim($root_path, \'\\\\/\');\n$root_path = str_replace(\'\\\\\', \'/\', $root_path);\n\n// Highlight.js for fargekoding\n$use_highlightjs = true;\n$highlightjs_style = \'ir-black\'; // Dark theme for kode\n\n// ====== HENT PATH ======\n$p = isset($_GET[\'p\']) ? $_GET[\'p\'] : \'\''..., $ext = 'php' )...\index.php:39
30.0061413560urlencode( $string = NULL )...\index.php:249
&raw=1" class="btn btn-primary" target="_blank"> Åpne raw
Gå til læring