403Webshell
Server IP : 127.0.0.1  /  Your IP : 192.168.99.1
Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9
System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64
User : Administrator ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  D:/bpkd_/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : D:/bpkd_//debug_article.php
<?php
require_once 'includes/init.php';

echo "<h2>Debug Artikel</h2>";

// 1. Cek data artikel di database
$result = $conn->query("SELECT id, title, slug FROM articles WHERE status = 'published' LIMIT 5");
echo "<h3>1. Data Artikel di Database:</h3>";
echo "<table border='1' cellpadding='5'>";
echo "<tr><th>ID</th><th>Judul</th><th>Slug</th></tr>";
while($row = $result->fetch_assoc()) {
    echo "<tr>";
    echo "<td>{$row['id']}</td>";
    echo "<td>{$row['title']}</td>";
    echo "<td>" . ($row['slug'] ?: '<span style="color:red">KOSONG</span>') . "</td>";
    echo "</tr>";
}
echo "</table>";

// 2. Cek fungsi article_url
echo "<h3>2. Fungsi article_url():</h3>";
if (function_exists('article_url')) {
    echo "<p style='color:green'>✓ Fungsi article_url() tersedia</p>";
    
    // Test fungsi dengan artikel pertama
    $first = $conn->query("SELECT id, title, slug FROM articles WHERE status = 'published' LIMIT 1")->fetch_assoc();
    $test_url = article_url($first);
    echo "<p>Test URL untuk artikel '{$first['title']}': <code>{$test_url}</code></p>";
} else {
    echo "<p style='color:red'>✗ Fungsi article_url() TIDAK tersedia!</p>";
}

// 3. Cek file artikel.php
echo "<h3>3. File artikel.php:</h3>";
if (file_exists('artikel.php')) {
    echo "<p style='color:green'>✓ File artikel.php ditemukan</p>";
} else {
    echo "<p style='color:red'>✗ File artikel.php TIDAK ditemukan!</p>";
}

// 4. Cek .htaccess
echo "<h3>4. File .htaccess:</h3>";
if (file_exists('.htaccess')) {
    echo "<p style='color:green'>✓ File .htaccess ditemukan</p>";
    $htaccess = file_get_contents('.htaccess');
    if (strpos($htaccess, 'RewriteRule ^artikel/') !== false) {
        echo "<p style='color:green'>✓ Aturan rewrite artikel ditemukan</p>";
    } else {
        echo "<p style='color:red'>✗ Aturan rewrite artikel TIDAK ditemukan!</p>";
    }
} else {
    echo "<p style='color:red'>✗ File .htaccess TIDAK ditemukan!</p>";
}

// 5. Test akses langsung
echo "<h3>5. Test Akses Langsung:</h3>";
$first = $conn->query("SELECT id, title, slug FROM articles WHERE status = 'published' LIMIT 1")->fetch_assoc();
$test_slug = $first['slug'] ?: createSlug($first['title']);
echo "<ul>";
echo "<li><a href='/cms_instansi/artikel.php?slug=$test_slug' target='_blank'>Test 1: /artikel.php?slug=$test_slug</a></li>";
echo "<li><a href='/cms_instansi/artikel/$test_slug' target='_blank'>Test 2: /artikel/$test_slug</a></li>";
echo "</ul>";
?>

Youez - 2016 - github.com/yon3zu
LinuXploit