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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:09:44+00:00 2026-05-16T22:09:44+00:00

I am developing using a Windows 7 machine with the local server being UniServer.

  • 0

I am developing using a Windows 7 machine with the local server being UniServer.

I have some PHP code to include all php files in a directory.

# Include all library classes.
$library_files = scandir(LIBRARY_PATH);
foreach ($library_files as $file) {
    $path_parts = pathinfo($file);
    if ($path_parts['extension'] == 'php') {
        require(LIBRARY_PATH . DIRECTORY_SEPARATOR . $file);
    }
}

Calling the scandir function causes the script to never end. I am not sure if this is a problem with the permissions of the folder. I am able to include files from within the folder.

What is going wrong here? Thankyou.

Edit: LIBRARY_PATH equals E:\Tools\UniServer\www\LIBRARY

Edit: Apparently it is working now. I’m confused, I haven’t changed anything at all. I think I might need to reinstall PHP. Thanks for helping

  • 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-16T22:09:44+00:00Added an answer on May 16, 2026 at 10:09 pm

    Calling the scandir function causes the script to never end

    A bit vague.

    Have you tried running the script from the CLI, writing to stdout after scandir and flushing the output buffer before entering the loop?

    What happens if you try to DIR E:\Tools\UniServer\www\LIBRARY at the command prompt?

    What happens when you try DIR E:\Tools\UniServer\www\LIBRARY within a PHP script?

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

Sidebar

Related Questions

I am using PHP and Mysql for developing an application. we have two copies
I am developing an application using Windows Mobile 5.0, under embedded VC++ 4.0, and
I've got two applications I'm developing using Qt on windows. I want the user
I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with
If i were developing a screensaver using a windows.form in C# how would i
I developing ASP.NET application using a Swedish version of Windows XP and Visual studio
I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose
I'll be developing something for a Windows Mobile device using CompactFramework/C#. I wonder if
I am developing a forms app (not web) for Windows Mobile, using .NET CF
I enjoy developing algorithms using the STL, however, I have this recurring problem where

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.