Change your include to have
./cpmfetch.php
. = same directory, .. = go up one, ../.. = means go up two directories...
Vuud,
The aforemention clarification has finally made me understand. Let me use the example, where the
cpmfetch is in
DirA while the "
static1.php files" are found in the following cases:
Case 1:"
cpmfetch" and "
static1.php files" in the same directory
DirA:
->"
cpmfetch" (the "coppermine fetch" script directory)
-> "
static1.php files" in group A1 including the common files, "top1.php" and "bottom.php" (files)
Case 2: "
static2.php files" are one sub-directory below "
cpmfetch". This is similar to the statement: "
cpmfetch" is one directory up the "
static2.php files"
->
DirA1: (sub-directory of DirA)
->-> "
static2.php files" in group A1 including the common files, "top2.php" and "bottom.php" (files)
Case 3: same as
Case 2:
->
DirA2: (sub-directory of DirA)
->-> "
static3.php files" in group A2 including the common files, "top3.php" and "bottom.php" (files)
Case 4: "
static2.php files" are two sub-directory levels below "
cpmfetch". This is similar to the statement: "
cpmfetch"are two sub-directory levels up the "
static2.php files"
->->
DirA2b: (sub-directory of DirA2)
->->-> "
static4.php files" in group A2b including the common files, "top4.php" and "bottom.php" (files)
etc.
So, here is the correct format, that works for most folks with just a single gallery:
Case 1<?php
include "./cpmfetch/cpmfetch.php";$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>
Cases 2 & 3<?php
include "../cpmfetch/cpmfetch.php";$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>
Case 4<?php
include "../../cpmfetch/cpmfetch.php";$objCpm = new cpmfetch("/photogal");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_viewLastAddedMedia(3,3);
$objCpm->cpm_close();
?>
Thanks.
CGC