Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
inc
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php // title From Data File // Get the current URL path $request_uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); // Extract the base filename (e.g., macro-calculator.php) $url_filename = pathinfo(basename($request_uri), PATHINFO_FILENAME) . '.php'; // Load tools data $tools_data = ['categories' => [], 'tools' => []]; if (file_exists(__DIR__ . '/../inc/data.tools.php')) { $tools_data = include __DIR__ . '/../inc/data.tools.php'; } // Find the matching tool $tool = null; foreach ($tools_data['tools'] as $t) { if (trim($t['file']) === $url_filename) { $tool = $t; break; } } // Set title and description $title = $tool ? htmlspecialchars($tool['name']) : 'Tool Not Found'; $description = $tool ? htmlspecialchars($tool['desc']) : 'No description available.';