Hi...
I have a php script which has a function call and function returns a value.
But when i open it in browser and refresh the page the return value will get added to the old value.
Code is:
When i run it in Terminal i will always get the desired value, but when i run it on browser. first time it displays currect value and on page refresh it adds the return value to old returned value.
i.e if return value echoed for 1st time is 4000 after page refresh i displays 8000, after next refresh 12000 and so on.
Script runs perfectly in terminal.
I am hosting pages on nginx and server log do not say anything as error.
Any idea why it behaves strangly?
Regards
Dheeraj
I have a php script which has a function call and function returns a value.
But when i open it in browser and refresh the page the return value will get added to the old value.
Code is:
Code:
<? php include("function.php"); $res=0; $res=function::fn_call() echo $res; ?>
i.e if return value echoed for 1st time is 4000 after page refresh i displays 8000, after next refresh 12000 and so on.
Script runs perfectly in terminal.
I am hosting pages on nginx and server log do not say anything as error.
Any idea why it behaves strangly?
Regards
Dheeraj
Comment