Jump to content

fizshoemaker

New Members
  • Posts

    3
  • Joined

  • Last visited

fizshoemaker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the prompt response. What if it was: www.example.com/file.php?dir=/var/www/html/videos/video1/index.html Is this what you mean? I have tried this and able to include index.html but the problem is that it won't include the images and scripts files. Is this something to do with the content-type?
  2. Hi all I am attempting to create a script in PHP which reads and includes all files from a directory which is above the domain name directory. For example: My domain name is example.com and located in /var/www/html/example.com/ and I want /var/www/html/example.com/file.php to be able to read from: /var/www/html/videos/video1/ which contains index.html and the folders: /var/www/html/videos/video1/images/ and /var/www/html/videos/video1/scripts/ [*]If I use include (/var/www/html/videos/video1/index.html) it will only call the html file, which is done perfectly. However all the files in images folder and the scripts folders are not able to load. I don't want to copy or call each file separately. I want to be able to only need to call index.html and then make the browser think it's in that directory and automatically read any file within there. I know this works because Moodle uses this method (in file.php) to protect learning files by storing them in a moodledata folder which is one level above the public folder. I've had a look but cannot make sense of it and I've searched the Internet to achieve the method I have explained above but have not had any success. The reason I want to do this is to avoid having duplicate video files on the server for other sites that are hosted on the same server. Many thanks in advance and for taking the time to assist.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.