use '?random=jpg' to get an URL of a random file

This commit is contained in:
qkqpttgf 2020-03-09 19:02:05 +08:00 committed by GitHub
parent 46714bff6b
commit 57ead42c49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -617,7 +617,7 @@ function main($path)
$files = list_files($path); $files = list_files($path);
//echo json_encode(array_keys($files['children']), JSON_PRETTY_PRINT); //echo json_encode(array_keys($files['children']), JSON_PRETTY_PRINT);
if ($_GET['random']!=='') { if (isset($_GET['random'])&&$_GET['random']!=='') {
if ($_SERVER['ishidden']<4) { if ($_SERVER['ishidden']<4) {
$tmp = []; $tmp = [];
foreach (array_keys($files['children']) as $filename) { foreach (array_keys($files['children']) as $filename) {