www.webdeveloper.com
Results 1 to 2 of 2

Thread: Reach files which are stored on your server disk.

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Reach files which are stored on your server disk.

    Hello, I planned to make a control panel for users uses applications that my server hosts.
    But those application files are not public, because that is not really secure.
    Now the problem is that I want to show the log file that the application makes at the control panel of the user.
    The only problem is i dont know how to show this file because it's not in my public_html.
    So my question is, how can I reach a file that isn't in my public_html but it is at my server disk.
    If this isn't possible, then I wonder how I can set files so that only my html/php/javascript page can enter it with a piece of code, and not that people can do something like mydomain.com/applicationname/logfile.txt
    If you understand what I mean, I hope somebody know a solution to this.

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    you write a php routine to load the file from disk from the non-public folder, and print its contents.
    it's not really a javascript question, but i'll try:

    logviewer.php:
    PHP Code:
     <?php  echo file_get_contents('path/to/YOUR/logfile.txt');  ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles