Results 1 to 4 of 4

Thread: Help including files outside of web/public_html folders

Threaded View

  1. #1

    Thread Starter
    Junior Member rrafluap's Avatar
    Join Date
    Sep 2009
    Location
    Plymouth, England.
    Posts
    23

    Help including files outside of web/public_html folders

    Hey, on my readynas duo i have a share called movies, inside the movies share there are hundreds of subdirectories each with a movie file (mostly avi), a txt file (Details.txt) and an image (cover.jpg)

    i am trying to list the contents using a php script, so far i can get the info from the text file but not the image as its not in my web share...

    Here is what i have:

    <?
    $MovieDir = "/c/Movies/The.Taking.of.Pelham.1.2.3[2009]/";
    $DetailsFile = $MovieDir . "Details.txt";
    $CoverFile = $MovieDir . "cover.jpg";


    $fh = fopen($DetailsFile, 'r');
    $theData = fread($fh, filesize($DetailsFile));
    fclose($fh);
    $delimiter ="@";
    list($title, $year, $genre, $plot, $tag, $imdb, $created) = explode($delimiter, $theData);


    echo "<table border='1'><tr><td>";
    echo "<b>Title:</b> $title<br>";
    echo "<b>Year:</b> $year<br>";
    echo "<b>Genre:</b> $genre<br>";
    echo "<b>Plot:</b> $plot<br>";
    echo "<b>Tagline:</b> $tag<br>";
    echo "<b>IMDb:</b> $imdb<br>";
    echo "<b>Created:</b> $created<br>";
    echo "</td><tr>";
    echo "<img src='" . $CoverFile . "></tr</td></table>";
    //echo $theData;
    ?>
    Obviously the last image tag is incorrect but you can see what i am trying to acomplish by what i have typed there, is there a function in php that will alow me to include it/load it into a variable etc... for use as the web path is "/c/web..." and the movies are in "/c/movies..." etc...


    Thanks, Paul.
    Last edited by rrafluap; May 30th, 2010 at 02:45 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width