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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:55:27+00:00 2026-05-23T04:55:27+00:00

I have 2 php files: index.php (5KB) blob.php (50,000KB – yes, 50mb php file)

  • 0

I have 2 php files:

index.php (5KB)
blob.php (50,000KB - yes, 50mb php file)

Now, index.php contains an if statement. Like this:

if (temp>3){
blah blah
} else {
require 'blob.php';
}

Will php load all of the 50MB every time index.php is requested or only when that part of the if statement is valid?

edit – cleaned the question to be more meaningful. Take the 50mb as just an example of “very large file”. I knew you guys would lose focus of the question so I tried to simplify the problem in advance and it backfired.

  • 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-23T04:55:28+00:00Added an answer on May 23, 2026 at 4:55 am

    As the require is a normal PHP function it will only be executed in the else case, which means the file shouldn’t be included in the other case. Think of echo in the file which would then be printet even if the else path isn’t executed.

    But again, WHY do you have 50MB of scripts?
    If you are including several script may an autoloader would be a better way then including them “manually” (see here)…

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

Sidebar

Related Questions

I'm writing multilingual website. I have several files on server like: /index.php /files.php /funny.php
I have a index.php file that will include several external files: content/templates/id1/template.php content/templates/id2/template.php content/templates/id3/template.php
I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like
So, ok. I have many php files and one index.php file. All files can't
I have two files: index.php /lib/user.php Index contains the form: <div class=<? echo $msgclass;
I have 3 files: index.php,.htaccess,404.shtml index.php contains: <?php header($_SERVER[SERVER_PROTOCOL]. 404 Not Found); ?> .htaccess
I have an index.php file that loads other php files via this javascript/ajax code:
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
I have an index.php file which has to process many different file types. How
I have various PHP files which data is Posted to (like the password when

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.