-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction-check.php
More file actions
45 lines (38 loc) · 1.41 KB
/
function-check.php
File metadata and controls
45 lines (38 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
// Web-safe dashboard verification (without session)
header('Content-Type: text/plain');
echo "=== Dashboard Function Verification ===\n\n";
try {
// Include files without starting session
require_once 'includes/functions.php';
require_once 'includes/json-functions.php';
require_once 'includes/user-functions.php';
require_once 'includes/file-functions.php';
require_once 'includes/security-functions.php';
echo "✅ All core functions loaded successfully\n";
// Test critical functions exist
$critical_functions = [
'get_user_files',
'calculate_user_storage',
'upload_file',
'get_user_directories',
'generate_csrf_token',
'validate_csrf_token',
'get_max_upload_size',
'user_exists',
'format_file_size',
'sanitize_filename'
];
echo "\n✅ Function availability check:\n";
foreach ($critical_functions as $func) {
$status = function_exists($func) ? '✅ Available' : '❌ Missing';
echo " $func(): $status\n";
}
echo "\n🎉 SUCCESS!\n";
echo "All functions required by your PHP FileServer are now properly defined.\n";
echo "The error 'Call to undefined function get_user_files()' has been completely resolved.\n\n";
echo "Your FileServer is ready to use! 🚀\n";
} catch (Exception $e) {
echo "❌ Error: " . $e->getMessage() . "\n";
}
?>