/
/
home
/
u523034047
/
domains
/
psassociate.org
/
public_html
/
phonepe
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.60
PHP 8.3.16
Dir:
/home/u523034047/domains/psassociate.org/public_html/phonepe
Edit:
/home/u523034047/domains/psassociate.org/public_html/phonepe/view_logs.php
<?php /** * phonepe/view_logs.php — Debugging Tool * * Lists the contents of the 'logs' directory and shows the latest log file. * Helps verify if PhonePe Webhook is hitting the server. */ error_reporting(E_ALL); ini_set('display_errors', 1); $logDir = __DIR__ . '/logs/'; echo "<h1>PhonePe Debugging Logs</h1>"; echo "<p>Checking directory: " . htmlspecialchars($logDir) . "</p>"; if (!is_dir($logDir)) { echo "<h3 style='color:red'>Log directory not found!</h3>"; echo "<p>This means PhonePe has NEVER hit callback.php, or permissions are wrong.</p>"; exit; } $files = scandir($logDir, SCANDIR_SORT_DESCENDING); $logFiles = array_filter($files, function ($f) { return strpos($f, '.log') !== false; }); if (empty($logFiles)) { echo "<h3 style='color:orange'>No log files found.</h3>"; echo "<p>Waiting for first transaction...</p>"; exit; } echo "<h3>Recent Log Files:</h3><ul>"; foreach ($logFiles as $file) { echo "<li><a href='?file=" . urlencode($file) . "'>$file</a> (" . date("F d Y H:i:s", filemtime($logDir . $file)) . ")</li>"; } echo "</ul>"; $currentFile = $_GET['file'] ?? $logFiles[0]; if (file_exists($logDir . $currentFile)) { echo "<h2>Content of: $currentFile</h2>"; echo "<div style='background:#f4f4f4; padding:15px; border:1px solid #ddd; max-height:500px; overflow:auto;'>"; echo "<pre>" . htmlspecialchars(file_get_contents($logDir . $currentFile)) . "</pre>"; echo "</div>"; } else { echo "<h3 style='color:red'>File not found: $currentFile</h3>"; } ?>
Ukuran: 1.5 KB