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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:59:07+00:00 2026-06-03T21:59:07+00:00

I am trying to display a slideshow. slide_auto.php is in the same directory as

  • 0

I am trying to display a slideshow.
slide_auto.php is in the same directory as my slideS_img folder

Here is my slide_auto.php file:

<?php
$file_dir="slideS_img"; //change this to a folder name
$show_titles=false; //change to false if you don't want to see the captions
$omit_chars=0; //how many characters to cut off the title's front
$link_to_image=false; //do you want to display links?

print '<?xml version="1.0" encoding="iso-8859-1"?>
<slideshow  displayTime="5" 
            transitionSpeed=".7"
            ...more code...
            >';

            $dir=opendir($file_dir);
        $xml_string= array();
            while ($file=readdir($dir))
            {
                if(substr($file, -3) == "jpg" || substr($file, -4) == "jpeg" ){
                $tmp_str = '<image img="'.$file_dir.'/'.$file.'" ';
                if($show_titles){
                    $file_title=substr($file, $omit_chars, strpos($file, ".")-$omit_chars);
                    $tmp_str .= 'caption="'.$file_title.'" ';

                }

                if($link_to_image){
                    $link_title=substr($file, $omit_chars, strpos($file, ".")-$omit_chars);
                    $tmp_str .= 'link="'.$file_dir.'/'.$file.'" target="_blank"';

                }

                    $tmp_str .=" />";
                    array_push($xml_string, $tmp_str);
                }


            }
            sort($xml_string);
            for($i=0; $i<count($xml_string); $i++){
            print $xml_string[$i];
            }
closedir($dir);
print '</slideshow>';
?>

amd my slideshowpage.php:

<?php
require_once('slideshow/slide_auto.php')
?>

<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body>
<div align="center">
<br />
<br />
<br />
<div id="flashcontent">
  This text is replaced by the Flash movie.
</div>

<script type="text/javascript">
   swfobject.embedSWF("slideshow.swf?file=slideshow/slide_auto.php", "gallery", "100%", "100%", "7", "#333333");
   so.write("flashcontent");
</script>
</div>
</body>
</html>

I get an error saying Warning: opendir(slideS_img) [function.opendir]: failed to open dir: No such file or directory in /[path]/slideshow/slide_auto.php on line 62

Any help?
Thank you

  • 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-06-03T21:59:09+00:00Added an answer on June 3, 2026 at 9:59 pm

    Marc is actually right in his solution. If I could try to elaborate a bit, when you include slide_auto.php, you can think the following happening:

    1. PHP inserts the text from the file slide_auto.php, where the include command is found.
    2. So, when $file_dir=”slideS_img”; comes up it tries to find the directory under slideshowpage.php, not slide_auto.php.

    This fails because the actual image folder is in directory slideshow.

    If you call slide_auto.php directly (or within the Flash application), then its directory is slideshow, and you should be able to get the XML without any further errors.

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

Sidebar

Related Questions

Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
Im trying to display a loading gif before submitting a multipart-form (file upload), this
Trying to display a message if no results found in the search query. Here
Im trying to display some points on the screen with opengl es. here is
Trying to display results from an sql query in PHP: SELECT * FROM wp_celebcount
Trying to display structExcelResult[strUrl] created by the function on my .cfm page. <cffunction name=getBuyerReport
I'm trying to implement a slideshow like this one: http://biggayicecreamtruck.com but for the life
I'm trying to create a dependent caption display from within the Cycle call: $('#slideshow-images').cycle({
I am trying display customized text behind my embedded Flash swf file on HTML.
Im trying to display the current users name in a button in my nav

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.