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
Quote from: 406man on December 27, 2025, 05:36:16 PMThere's a way you can implement it which I won't claim is particularly clean or clever but it works.
Here's an example with a page called page-abc.php which uses the PHP require statement to call page-xyz.php in sub directory /sub which is directly beneath the main coppermine directory
Here is the code for the two scripts, being sure to include a security check:<?phpOnce page-abc.php has been created you don't need to touch it again and you can just update page-xyz.php
/*** page-abc.php ***/
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
define('RESTRICTED_PRIV', true);
require('include/init.inc.php');
include './sub/page-xyz.php';
?>
<?php
/*** page-xyz.php ***/
if (!defined('IN_COPPERMINE')) {
die('Not in Coppermine...');
}
echo 'This is the sub page';
?>
<?php
/*** page-abc.php ***/
define('IN_COPPERMINE', true);
define('INDEX_PHP', true);
define('RESTRICTED_PRIV', true);
require('include/init.inc.php');
include './sub/page-xyz.php';
?>
<?php
/*** page-xyz.php ***/
if (!defined('IN_COPPERMINE')) {
die('Not in Coppermine...');
}
echo 'This is the sub page';
?>
Once page-abc.php has been created you don't need to touch it again and you can just update page-xyz.php
Page created in 0.359 seconds with 10 queries.