Unexpected $end in eval()'d code

前端 未结 2 557
抹茶落季
抹茶落季 2020-12-16 15:31

I hate to ask such a specific question, but I\'m getting an error I can\'t figure out. This is in a cron job which runs on the hour. I\'m creating an array of tasks, each of

2条回答
  •  清歌不尽
    2020-12-16 16:18

    You are missing ';' on end of string evaluation. Eval function able to process statements or expressions.

    Example:

    $value = 7;
    eval("\$value+=2;");
    echo $value;
    

提交回复
热议问题