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:
Expand|Select|Wrap|Line Numbers
- <? 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