• 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

Post Form Data To phpmyadmin Database

Reducing authentication calls on external API (Laravel 5.6)

Where do I need to place a hook for phpunit?

Laravel 5.5 change unauthenticated login redirect url

Twig - How to check if variable is a number / integer

Limit WooCommerce products in cart only from one custom taxonomy

Extract house numbers from address string

Yii2: How to download backup files using spanjeta/yii2-backup?

How to install ZeroMQ for PHP on an Alpine Linux container?

How can I format this number correctly using PHP?

MISSING UPDATES FOR: MEDIA Drupal 9

Wordpress add responsive srcset header image to theme

How to disable widget block editor of WordPress?

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

Phpunit partial mock + proxy Entity

About Contact Privacy policy Terms and conditions