• 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

How do I get friend list from Friends table with counts of friends of my friends

Make Shipping Method fields Mandatory on Woocommerce checkout page

Auto increment id JSON

Laravel Delete and Update

How to run or debug php on Visual Studio Code (VSCode)

SlimExceptionHttpNotFoundException

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Sagepay Error The Vendor failed to provide a RedirectionURL

Access denied for user 'homestead'@'localhost' (using password: YES)

Woocommerce product attributes with hierarchy like categories

PHP - Store information with NO database

Custom API and cunsuming in php?

HTML and PHP in one file

Xdebug can't connect back to Docker host

php file upload scanning using clamav, permissions on /tmp/

About Contact Privacy policy Terms and conditions