-
- 1 Posts
Hello togheter.
??? My problem is that I want to include my own (and still existing) PHP-Scripts into my MODx-Site. I’m a total newbie in MODx so I need a little bit help.
Thanks a lot for ervery answer.
-
- 1,084 Posts
Just create a new snippet, put into a snippet your own script
Make a snippet with "include my_original_php_scripts.php" and put the snippet wherever you want the output of your original scripts to be.
// snippet to include my original scripts
$include_path = "path/to/original/scripts/";
include $include_path . "original_script.php";
return do_stuff();
Keep in mind that the snippet must be told to return or echo or print anything, it will not generate a page by itself as a stand-alone php file will.