php导航目录并播放.ogg视频弹出

时间:2018-06-14 11:53:13

标签: javascript php jquery html

我需要一个有人可以的网页 导航到特定目录及其所有子目录并打开弹出窗口以播放选择的ogg视频文件。

目前只有我用该代码完成的目录导航,视频打开正常,但是在新页面中而不是弹出窗口

<?php

// Include the DirectoryLister class
require_once('resources/DirectoryLister.php');

// Initialize the DirectoryLister object
$lister = new DirectoryLister();

// Restrict access to current directory
ini_set('open_basedir', getcwd());

// Return file hash
if (isset($_GET['hash'])) {

    // Get file hash array and JSON encode it
    $hashes = $lister->getFileHash($_GET['hash']);
    $data   = json_encode($hashes);

    // Return the data
    die($data);

}

if (isset($_GET['zip'])) {

    $dirArray = $lister->zipDirectory($_GET['zip']);

} else {

    // Initialize the directory array
    if (isset($_GET['dir'])) {
        $dirArray = $lister->listDirectory($_GET['dir']);
    } else {
        $dirArray = $lister->listDirectory('.');
    }

    // Define theme path
    if (!defined('THEMEPATH')) {
        define('THEMEPATH', $lister->getThemePath());
    }

    // Set path to theme index
    $themeIndex = $lister->getThemePath(true) . '/index.php';

    // Initialize the theme
    if (file_exists($themeIndex)) {
        include($themeIndex);
    } else {
        die('ERROR: Failed to initialize theme');
    }

}

this is a screenshot how it shows at the moment

0 个答案:

没有答案