+ Reply to Thread
Results 1 to 3 of 3

Thread: Stop a file being downloaded

  1. #1
    dandyman1 is offline x10Hosting Member dandyman1 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    2

    Stop a file being downloaded

    Hi,

    I want my php scripts to be able to access some text files. However I do not want these text files being downloaded by the user. Is it possible to run save text files somewhere where they can't be downloaded?

    Thanks for your help

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Stop a file being downloaded

    On x10hosting, your personal file system starts at /home/igor , where igor is your cPanel username.

    Your Document Root, the files that are directly accessible via the web, starts at /home/igor/public_html

    A PHP script can access any file on your personal file system.

    So, if you want to have files accessible by scripts but not directly via the web, create a directory, /home/igor/includes , and place the files there. When you require them in your PHP script, remember to use the absolute path.

    Alternatively, you can put them in a directory, /home/igor/public_html/includes , and then password-protect the directory.
    Last edited by descalzo; 08-25-2011 at 10:48 AM.
    Nothing is always absolutely so.

  3. #3
    dandyman1 is offline x10Hosting Member dandyman1 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    2

    Re: Stop a file being downloaded

    Thanks you saved my project

+ Reply to Thread

Similar Threads

  1. please check my interspire i downloaded
    By limwultan98 in forum Free Hosting
    Replies: 2
    Last Post: 11-10-2010, 05:52 PM
  2. My Cat Downloaded the Porn, Not Me!
    By adamparkzer in forum Off Topic
    Replies: 16
    Last Post: 08-20-2009, 12:43 AM
  3. Replies: 4
    Last Post: 04-19-2009, 07:23 PM
  4. Uploading files so they can be downloaded by a link
    By trainzguy1160 in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 09-16-2007, 12:50 PM
  5. Hack found in IPB 2.2.2 (For those that downloaded it on Internet)
    By DarkDragonLord in forum Computers & Technology
    Replies: 1
    Last Post: 08-21-2007, 03:59 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
x10hosting free hosting for the masses
dedicated servers