Hello,
at the top of a template, berore html headers I call my [[snippet]].
Content of the snippet :
<?php
require('/homez.305/user/www/assets/user/extension/treatments.php');
?>
Content of treatments.php :
<?php
function fakeFunction(){
echo 'ooo';
}
?>
This is enough to stop the script :
Fatal error: Cannot redeclare fakefunction() (previously declared in /homez.305/mysite/www/assets/user/extension/generalFunctions.php:8) in /homez.305/mysite/www/assets/user/extension/generalFunctions.php on line 11
Modx 1.0 . Yams installed
I have antoher question, is it possible that if I define $test=’ok’; in a snippet, the variable to be reachable in others snippets ? so I do not have to require() twice the config.php for programs that are called in two times.
Thanks for your help