• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

phpmodxevolution-cms


PHP Snippet 1:

// Modx init
require_once 'config.core.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
$modx = new modX();
$modx->initialize('mgr');

// Run snippet
$modx->runSnippet('functions_main');

// Run your functions here

Related Snippets

JQuery content editable div and text box on submit not sending POST

How to run a shell as root from php (apache)

javascript html popup window

if statement inside concatenation

Is there a way to correctly use sanitize_text_field and wp_unslash that doesn't cause psalm to error with "expects string, possibly different type"

AJAX call fails with SyntaxError: Unexpected end of JSON input

Attempt to read property "view" on null when sending password reset email

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

Fetch files from next cloud storage and display in Laravel website

WooCommerce Subscriptions: Remove role on cancelled subscription

Problems getting instance of UploadedFile in Yii2

Add restriction to WooCommerce coupons by allowed user ID

Adding reCAPTCHA v2 into my PHP file

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

PHP Download MP3 files from directory on server

About Contact Privacy policy Terms and conditions