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 284967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:30:14+00:00 2026-05-12T05:30:14+00:00

<?php if($_FILES[‘Filedata’][‘size’]>=520000) { echo \n Sorry, Not Moved Size below 5.2kb or 5200 bytes

  • 0
<?php

    if($_FILES['Filedata']['size']>=520000)
    {
        echo "\n Sorry, Not Moved Size below 5.2kb or 5200 bytes Only\n";
        return;
    }
    $ext = end(explode('.', strtolower($_FILES['Filedata']['name'])));

    if(move_uploaded_file($_FILES['Filedata']['tmp_name'], "./".$_FILES['Filedata']['name']))
    {
        echo "\nfile moved Success\n";
        return;
    }
?>

When i set path, it does not work… i dont know where to exactly set path such that the file gets saved in the directory.

  • 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-12T05:30:14+00:00Added an answer on May 12, 2026 at 5:30 am

    See the move_uploaded_file documentation.

    The first argument ($_FILES['Filedata']['tmp_name']) is the source, which you shouldn’t change. The second argument ("./".$_FILES['Filedata']['name']) is the destination, which will currently put the file in the current working directory with its original name (This can be a security issue; you should put the file in an upload directory that has no execute permissions.)

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

Sidebar

Related Questions

I am updating a php app, which currently does not use url rewriting. The
I have two PHP files that I need to link. How can I link
I am making numerous, minute changes to .php files in Eclipse PDT then committing
I'm writing multilingual website. I have several files on server like: /index.php /files.php /funny.php
I have quite a lot of PHP view files, which I used to include
Is there a static analysis tool for PHP source files? The binary itself can
I am using the singleton pattern in all my PHP class files. Would it
I have a fairly large PHP codebase (10k files) that I work with using
Is it possible to read and write Word (2003 and 2007) files in PHP
open_basedir limits the files that can be opened by PHP within a directory-tree. I

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.