Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8453481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:47:09+00:00 2026-06-10T11:47:09+00:00

i am trying to implement a user system (PHP) where every user has a

  • 0

i am trying to implement a user system (PHP) where every user has a unique files folder,
the user can upload any files to that folder and download it later.

current restriction are: string of ‘htaccess’ inside file names is replaced with ‘hhtaccesss’.
no sub folders are created.

my question: is there any way (.htaccess or other) to make those files for download purpose only? in order to ensure that none of those unknown files will be run on the system?

sub question is there any danger zip/unzip those files?

example: if the user types a direct url to a .php file, the system will not process the file(which can be harmful) and instead just ‘deliver’ it to the user?
same for all types of scripts/files..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:47:11+00:00Added an answer on June 10, 2026 at 11:47 am

    in .htaccess in the appropriate directory add

      ForceType application/octet-stream
      Header set Content-Disposition attachment
    

    should force the browser to download any file no matter the type. can use <FilesMatch .. if you want to leave some intact.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to Implement a JFileChooser that allows a user to select files
I am trying to implement a choice system whereby a user can click on
I am trying to implement a text box that, when the user types something,
In my app I'm trying to implement a feature that helps the user to
I'm very new to RoR, and am trying to implement a user login system.
I'm trying to implement an indirect download through PHP. On the client side I
I am trying to implement a 'remember me' system with cookies that will remember
I'm trying to implement basic auditing for a system where users can login, change
I've been trying to implement a commenting system for my Rails app. Every event
I am trying to implement a threaded comment system using php, and i found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.