Hi I am trying this mod, but I cant get the photo to show. I add the code in my index.html, the first site in my webpage. Coppermine is in the folder gallery, and the cpmfetch is within the gallery folder. SO I used the code that appears after you install the mod (when it redirects you to screen.php), I use this code without any change since it uses the same directory structure that I have.
<?php
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
I put this code in a table in my index.html
What I am doing wrong??? :-\
Quote from: freeedy on April 25, 2007, 07:43:00 PM
Hi I am trying this mod, but I cant get the photo to show. I add the code in my index.html, the first site in my webpage. Coppermine is in the folder gallery, and the cpmfetch is within the gallery folder. SO I used the code that appears after you install the mod (when it redirects you to screen.php), I use this code without any change since it uses the same directory structure that I have.
<?php
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
I put this code in a table in my index.html
What I am doing wrong??? :-\
php code only runs in php files
You mind as well write it on a piece of paper...
You need a server that supports php and you need it in a php file (like index.php)
I do have a server, I am not that stupid. I didnt knew it just works in php, maybe thats the reason it doesnt work, anyway thanks for your help.
Quote from: freeedy on April 26, 2007, 08:10:58 PM
I do have a server, I am not that stupid. I didnt knew it just works in php, maybe thats the reason it doesnt work, anyway thanks for your help.
I know you knew you had a server, I said a "server that supports php"... since you were putting <?php ?> blocks into an HTML, its not a far leap to not realizing you need one of those.
Paste it into a index.php and try calling that just to see if it works.
I was having the same problem, as I did not see the part about only working on PHP.
Although my server does support php, my test file was named test.html, which I switched to test.php, and all works fine..Did you try just changing file names?
Quote from: skidpics on May 17, 2007, 05:17:55 PM
I was having the same problem, as I did not see the part about only working on PHP.
Although my server does support php, my test file was named test.html, which I switched to test.php, and all works fine..Did you try just changing file names?
If that is the case, then your server does support PHP. Maybe they just don't want to tell you :)