• 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

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

PHP mail function is sending blank message body

PHP: remove filename from path

woocommerce change position of price

Input and output values for php into the browser?

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

How to convert a carbon into string, to take the date only?

Timber: Single post pagination does not work (wp_link_pages)

jQuery Ajax Post with data

Laravel eloquent update record without loading from database

Dynamic dropdown Ajax PHP request

PHP, how to convert Int value to Week days

Laravel: Why is my variable not being set while it's in the construct function of the controller?

PHP drop down list using array's and foreach (else and for) code

How can I create a Download Page with post php method?

About Contact Privacy policy Terms and conditions