The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

PHP not giving correct results (1 post)

  1. CharlesJDillon
    Posted 2 years ago #

    Hi, I am trying to get Exec-PHP to work, in testing I tried just a test global code that you can use to make sure your php is working.

    $a = 1;
    $b = 2;
    function Sum()
        $GLOBALS['b'] = $GLOBALS['a'] + $GLOBALS['b'];
    echo $b;

    Everywhere else the answer is 3 of course, but for some reason when I run it through on my WordPress site using Exec-PHP it is giving me the answer of 2.

    Eventually I would like to run table data from a MySQL but if it is not even giving me the right answer for a generic global...I am not sure where the problem is.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Exec-PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic