• 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

Adding one microsecond to Datetime object in PHP

Detect emoticons in string

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT "INOUT")

Laravel update hasMany relationship using saveMany

PHP Include for HTML?

Utf8 encoding issue with Laravel

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

Convert PHP array into HTML tag attributes separated by spaces

protect my blog content

How to get unique slug to same post-title for other time too?

Laravel MSSQL Server Connection not working

Eloquent insert id with sequence next value

Custom post type single page not working

PHP Imap , php 7.4.3 on mac osx catalina

Add custom text under order details on WooCommerce My account view order pages

About Contact Privacy policy Terms and conditions