• Hello

    I am very new to WordPress and am trying to create a plugin
    that will display on a website page (ex: page id 1654)
    the contents of a directory of the server….
    and have no idea how to do this.

    I can my plugin in the admin panel and am able to activate it, but how do I get it to display on a single page?

    Code:

    $dir = ‘http://www.eastcoasttechwriter.ca/httpdocs/wp-content/plugins/UploadMe/images/’;

    if (is_dir($dir))
    {
    if ($dh = opendir($dir))
    {
    while (($file = readdir($dh)) !== false)
    {
    echo “filename: $file : filetype: ” . filetype($dir . $file) . “\n”;
    }
    closedir($dh);
    }
    else
    {
    echo “No Files found.”;
    }

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Newbie has question’ is closed to new replies.