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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:59:26+00:00 2026-05-23T07:59:26+00:00

I have some content loaded via ajax that includes the scandir() function. On local

  • 0

I have some content loaded via ajax that includes the scandir() function. On local and on my server it works perfectly, however on my client’s server it didn’t work because they run PHP4 (scandir() was implemented in version 5). I called tech support and their solution was to change file extensions from .php to .php5. However, this only partially works if I call directly the page, but when I load it via ajax it does not.

Is there a way to fix this? I didn’t know ajax and PHP could be incompatible.

EDIT

Here’s part of the code. Is simply an image gallery and I’m using scandir() to get the images:

<div id="#vtabs-content-a">
    <ul class="slider">
        <?php
            $featured_dir = 'img/systems/6020/';
            $scan = scandir($featured_dir);
            echo '<li id="' . $scan[2] . '"><img src="' . $featured_dir . $scan[2] . '" alt="' . $scan[2] . '" width="700" height="350" /></li>';
        ?>
    </ul>
    <ul class="thumb 6020a">
        <?php
            $dir = 'img/systems/6020/z_thumbs/';
            $scan = scandir($dir);  
            for ($i = 0; $i<count($scan); $i++) {
                if ($scan[$i] != '.' && $scan[$i] != '..') {
                echo '<li><a href="#' . $featured_dir . $scan[$i] . '"><img src="' . $dir . $scan[$i] . '" alt="' . $scan[$i] . '" width="40" height="40" /></a></li>';
                }
            }; 
        ?>
    </ul>

I actually had forgotten to change to .php5 in the ajax call, already did it but still won’t work. Another point is that when I call the page directly the slideshow doesn’t work, but at least the pictures are there.

The ajax call is this:

$(".a6020").live("click", function(){
    $("#main").load("a6020.php5 #container", function(){
        $('#vtabs5').jVertTabs();
        $.getScript("js/scandir.js", function(){
        });
    });
});
  • 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-23T07:59:26+00:00Added an answer on May 23, 2026 at 7:59 am

    You could try adding a .htaccess file to run php5 on extensions that end in .php by adding

    AddHandler application/x-httpd-php5 .php 
    

    To a .htaccess file.

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

Sidebar

Related Questions

I have some content from server using $.ajax() function. I try to replace some
I have some content on my page that I require to be loaded via
I have some content that I am loading using jquery ajax. The content has
I would like to hide some part of content loaded via ajax, when the
I have some content that i have to render as a excel file in
I have some content that I want to appear on multiple pages of my
I'm doing some in browser editing, and I have some content that's on the
In silverlight 2.0. I have some content that i want to scroll vertically and
So I have some Spanish content saved in Excel, that I am exporting into
I am currently loading HTMl content via AJAX. I have code for things on

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.