Soporte » Plugins y Hacks » Hacks » ajax function executes the main plugin file

  • Hello,
    Every time I make an ajax request the main file (plugin-name.php) gets rerun,


    namespace pluginname;
    $number = rand(0,10);


    namespace pluginname\ajax;
    function getNumber(){
    global $number;
    echo $number;// The result varies, 

    The result varies, because plugin-name.php is executed again.
    How can I fix this without using the database?
    thank you very much

Viendo 1 respuesta (de un total de 1)
Viendo 1 respuesta (de un total de 1)
  • Debes estar registrado para responder a este debate.