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

  • SEARCH
  • Home
  • 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 3756842
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:54:51+00:00 2026-05-19T09:54:51+00:00

I am making a file hosting website like web hosting sites (megaupload, rapidshare, mediafire

  • 0

I am making a file hosting website like web hosting sites (megaupload, rapidshare, mediafire etc.) using PHP (or tell me if its easy to implement in ASP.NET).

Project is almost complete but uploading module is not working correctly. I Google it but couldn’t find any help so thought to ask here if anybody can help.

Whenever I try to upload a file of size in kb, the script execute well and upload file but when I select a file of size greater than 1MB, it gives error message during upload, can anybody help me how can I upload file using HTTP protocols in PHP.

Here is my script for upload:

// Configuration - Your Options

$allowed_filetypes = array('.jpg','.gif','.bmp','.png'); 
$filename = $_FILES['userfile']['name'];
$ext = substr($filename, strpos($filename,'.'), strlen($filename)-1);
 if(!in_array($ext,$allowed_filetypes))
 die('The file you attempted to upload is not allowed.');
 if(filesize($_FILES['userfile']['tmp_name']) > $max_filesize)
  die('The file you attempted to upload is too large.');
 if(!is_writable($upload_path))
  die('You cannot upload to the specified directory, please CHMOD it to 777.');
 if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename))
     echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>'; 
 else
     echo 'Error during uploading.';  
  • 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-05-19T09:54:52+00:00Added an answer on May 19, 2026 at 9:54 am

    open php.ini, find and edit directives:

    post_max_size
    upload_max_filesize

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

Sidebar

Related Questions

I am making a small file hosting website, and each user can upload multiple
I am making a POST to another php file that I want to render
I am making an ajax call to a php file on my server. That
I'm making a chat script using jQuery and JSON, but my hosting suspends it
im making a file explorer tool in c# .. im using ListView to explore
Hi I'm making a basic HTML website using Microsoft WebMatrix locally. When I've finished
im making file transfer (Server-Client) TCP i've already looked for same questions like this
I'm making a file edit interface in my web-app, I have a textarea with
I am making file input boxes through a javascrpit function, if the user wants
I am making a CSS file for an XML document. I need to insert

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.