我使用heredoc语法覆盖了我的字符串但是它显示错误下面是我的代码:[重复]

问题描述

|                                                                                                                   这个问题已经在这里有了答案:                                                      

解决方法

        结束符“ 0”一定不能缩进。     ,        Heredoc结尾需要在一行的开头,请尝试以下操作:
<?php
        $my_string = <<<TO
         Everything in this rather unnecessarily wordy
        ramble of prose will be incorporated into the 
        string that we are building up inevitably,inexorably,character by character,line by line,until we reach that blessed //final line which is this one.
TO;
        echo $my_string;
    ?>