• 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 to show a popup modal in codeIgniter?

PHP: Print caught exception like Xdebug

Add record for each array elements if missing in table

Google Calendar API batch request PHP

How to get monthly wise data in laravel

Laravel Mix Uncaught ReferenceError: $ is not defined

Check if user online laravel

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

Laravel Route issues with Route order in web.php

Unable to guess the mime type as no guessers are available Laravel 5.2

Why does array_map() with null as callback create an "array of arrays"?

PHP function Not Working As Expected From functions.php Include File

OctoberCMS / Anonymous Global Scope

Cannot connect to own websocket server when on secured domain

Filter WooCommerce products with post__in and additional meta queries

About Contact Privacy policy Terms and conditions