Web Analytics Made Easy -
StatCounter Read file from outside document root - CodingForum

Announcement

Collapse
No announcement yet.

Read file from outside document root

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Read file from outside document root

    Sorry, if this question has been asked before (and I am sure it has),

    How do I read the text file from outside document root?

    and I have a very little knowledge about PHP

    Thank you

  • #2
    Hi , no differently from any other file.

    [PHP]
    <?php
    include('/home/user/stuff/file.txt');
    /*or*/
    file_get_contents('/hme/user/stuff/file.txt');
    /*or look at fopen, fgets/fclose etc */
    ?>
    [/PHP
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

    Comment


    • #3
      thank you so much

      Comment

      Working...
      X