embedding php scripts (1 post)

  1. alekone
    Posted 9 years ago #

    this is a little OT, but I think it's of general interest.

    I want to include() a php gallery script in my wordpress homepage. actually the script (gallerize) creates thumbnail and links to full images in a subdirectory, /gallery/ .

    my problem is: when I include /gallery/index.php in my homepage template, it takes as a working directory the root of my website, not the /gallery subdir.

    there is a way for including scripts, but making them work in their own directory?
    I think I have to modify something in the following lines:
    #Open the cwd and build a list of JPG files
    $jpegs = array();
    $directory = opendir(getcwd()) ;

    could you please help me?
    thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.