[Solved]: CPM Fetch problem [Solved]: CPM Fetch problem
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

[Solved]: CPM Fetch problem

Started by liberiangirl90, October 06, 2009, 01:51:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

liberiangirl90

Hi,
I'm working on a new layout for my website but I have problems with cpm fetch...
I cannot see the images, just a code...
Here's the page:
http://www.madonnaitaly.net/index2.html

I used the second code provided by cpm fetch during the installation because it describes exactly my case:

<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


Joachim Müller

That's not very surprising: PHP code is not parsed on an HTML page. That's why the code doesn't get executed on the server and is just being sent to the client's browser, where it is being treated as text and therefor shows through. Not related to cpmFetch in itself, but a general issue for you (or rather "expected behaviour"): since cpmFetch is PHP-driven, you can only use it on PHP pages.
Rename http://www.madonnaitaly.net/index2.html to http://www.madonnaitaly.net/index2.php using your FTP app, then try again, accessing http://www.madonnaitaly.net/index2.php in your browser should then do the trick.

liberiangirl90

Thank you so much, now it works!   :)