“Fatal error: Cannot redeclare

前端 未结 17 769
[愿得一人]
[愿得一人] 2020-11-22 05:26

I have a function(this is exactly how it appears, from the top of my file):



        
17条回答
  •  广开言路
    2020-11-22 06:20

    In my case it was because of function inside another function! once I moved out the function, error was gone , and everything worked as expected.

    This answer explains why you shouldn't use function inside function.

    This might help somebody.

提交回复
热议问题