Why isn't my php working?

Soldato
Joined
25 Oct 2002
Posts
4,198
Location
Derbyshire
I'm a php newbie and had a script on the clubs old site. Now i've tried to move it i can't get it to run :(

This isn't working:-

http://ccgi.theblue.plus.com/CSAC_website/testpage.php

PHP:
<?php
  include_once "http://ccgi.theblue.plus.com/cpg1414/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("http://ccgi.theblue.plus.com/cpg1414/cpmfetch/cpmfetch_config.php");
  $options = array('windowtarget' => '_parent');
  $objCpm->cpm_viewRandomMediaFrom("cat=1,2,3,4,5",1, 4, $options);
  $objCpm->cpm_close(); 
?>

this does:-

http://ccgi.theblue.plus.com/cpg1414/cpmfetch/Test.php

PHP:
<?php
  include_once "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $options = array('windowtarget' => '_parent');
  $objCpm->cpm_viewRandomMediaFrom("cat=1,2,3,4,5",1, 4, $options);
  $objCpm->cpm_close(); 
?>


any ideas?
 
If you try and access http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html it's just blank. What's in the file?

You probably need to copy cpmfetch.php into a directory which you can access without using the URL though.

Its part of a coppermine (photo album) script that grabs ramdom pictures from the data base and displays them how you asked it to.

http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html

How it works is a mystery to me :)

knowing cpmfetch is here

http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html

and my page is here:-

http://ccgi.theblue.plus.com/CSAC_website/testpage.php

can the code be written without the url like in the 2nd example?
 
Last edited:
Back
Top Bottom