Ready to get started?Download WordPress


PHP not giving correct results (1 post)

  1. CharlesJDillon
    Posted 11 months 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.



You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by CharlesJDillon
  • This topic is not resolved
  • WordPress version: 3.6