Ok... I try to explain better the problem.
I installed a new modx 0.9.6.1 end a new bbclone script.
This is the structure of the folders in htdocs of xampp
C:\Programmi\xampp\htdocs\modxsite
modxsite
|__ assets
|__ manager
|__ statistiche <-- bbclone directory
|__ index.php
Then I create a new snippet called bbclone and I insert it in template using [!bbclone]]
This is code of the snippet
$_SERVER['HTTP_USER_AGENT'] = $HTTP_USER_AGENT;
$_SERVER['HTTP_REFERER'] = $HTTP_REFERER;
$page_title=$modx->documentObject['pagetitle'];
define("_BBC_PAGE_NAME", "$page_title");
define("_BBCLONE_DIR", "statistiche/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
...but don’t work. When I load the page "
http://localhost/modxsite/index.php" and then "http://localhost/modxsite/statistiche" the counter of bbclone not increase.
Instead, the same code inserted at the end of modx file index.php work correctly.
It’s strange. Not?