PHP-E#u COMPILE_ERROR-eval()';d代码。埃罗:不能重新申报

PHP-E#u COMPILE_ERROR-eval()';d代码。埃罗:不能重新申报,php,wordpress,Php,Wordpress,嗨,我在Wordpress中有一个PHP代码,我使用WoodySnippets,最近我回滚了备份,所以出现了这个错误。我不知道如何解决这个问题 “文件/public\u html/wp content/plugins/insert php/includes/shortcodes/shortcode php.php(52):eval()'d code.menmanagem de erro:Cannot redclare montaTexto()(先前在/public\u html/wp conte

嗨,我在Wordpress中有一个PHP代码,我使用WoodySnippets,最近我回滚了备份,所以出现了这个错误。我不知道如何解决这个问题

“文件/public\u html/wp content/plugins/insert php/includes/shortcodes/shortcode php.php(52):eval()'d code.menmanagem de erro:Cannot redclare montaTexto()(先前在/public\u html/wp content/plugins/insert php/includes/shortcodes/shortcode php.php(52):eval()中声明)的第89行出现了一个错误,即编译错误“d代码:90)”

我的PHP代码是这样的

session_start();

$p_fat = ($_REQUEST['faturamento']);
$p_lmg = ($_REQUEST['lmg']);
$p_nome = ($_REQUEST['nome']);
$p_telefone = ($_REQUEST['telefone']);

$p_fat = explode("-", $p_fat);
$p_lmg = explode("-", $p_lmg);

$cliente = explode(" ", $p_nome);

$row=0;
// Abre o Arquvio no Modo r (para leitura)
$arquivo = fopen ('file.txt', 'r');

// Lê o conteúdo do arquivo 
try {
    
    if (empty($p_nome)) {
        throw new Exception('Empty Form.');
    }
    
    $fileName = 'file.txt';
    
    if ( !file_exists($fileName) ) {
        throw new Exception('File not found.');
    }
    
    // Abre o Arquivo no Modo r (para leitura)
    $arquivo = fopen($fileName, "r");
    
    if ( !$arquivo ) {
        throw new Exception('File open failed.');
    } 
    
    while(!feof($arquivo)) {
        //Mostra uma linha do arquivo
        $linha = fgets($arquivo, 1024);
        $colunas = explode(";",$linha,8);

        foreach($colunas as $key => $conteudo){
            if ($row == 0 && $key == $p_lmg[1]) {
                $lmg = number_format($conteudo, 2, ',', '.');
            } 
            if ($row == $p_fat[1]) {
                if ($key==1) $de = number_format($conteudo, 2, ',', '.');
                if ($key==2) $ate = number_format($conteudo, 2, ',', '.');
            }
            
            if ($row == $p_fat[1] && $key == $p_lmg[1]) {
                $valorSeguro = number_format($conteudo, 2, ',', '.');
            }
        }   
        $row++;
    }
    // Fecha arquivo aberto
    fclose($arquivo);
    
    $_SESSION["faturamento"] = "De R$$de até R$$ate";
    $_SESSION["lmg"] = $lmg;
    $_SESSION["valorSeguro"] = $valorSeguro;
    $_SESSION["cliente"] = $cliente[0];
    $_SESSION["telefone"] = $p_telefone;
    
} catch ( Exception $e ) {
    echo "problema!!";
}   

if (!empty($_SESSION["faturamento"])) { 
    montaTexto();
}

$textoEmail = "Nome: $p_nome\n Telefone: $p_telefone\n LMG: $lmg \n Faturamento: De R$$de até R$$ate ";


try {
    
    if (empty($p_nome)) {
        throw new Exception('Empty Form.');
    }
    
    enviaEmail($textoEmail, $p_nome);
    
} catch ( Exception $e ) {
    echo "";
}

function montaTexto(){
    $texto1 = "<p class='cot txt-1'><strong>".$_SESSION["cliente"]."</strong><br/>Sua cotação ficou avaliada em: </p>";
    
    $texto2 = "<p class='cot txt-2'>R$".$_SESSION["valorSeguro"]."</p>";
    $texto2 = "<p class='cot txt-2' id='tooltip'><span style='border-bottom: 1px dotted;'>R$".$_SESSION["valorSeguro"]."</span> *
                <span class='tooltiptext'>* Franquia</span>
               </p>";
    
    $texto3 = "<p class='cot txt-3'> <strong>Faturamento Anual</strong><br> "
            . $_SESSION["faturamento"] . "</br>"
            . "<strong>Limite Máximo de Garantia (LMG)</strong><br> R$" . $_SESSION["lmg"]
            . "</p>";
    echo $texto1.$texto2.$texto3;
}

function enviaEmail($textoEmail,$nome) {

    $para = "email@hotmail.com";
    
    $headers = "From: $nome \r\n" .
    "Reply-To: $para \r\n" .
    'X-Mailer: PHP/' . phpversion();
    
    try {
        //mail($para, $assunto, $textoEmail, $headers);
        mail($para, $assunto, $textoEmail);
        //echo "email trabalho";
    } catch ( Exception $e ) {
        echo "Não foi email!";
    } 
}
?>
session_start();
$p_fat=($_请求['faturamento']);
$p_lmg=($_请求['lmg');
$p_nome=($u请求['nome']);
$p_telefone=($u请求['telefone']);
$p_-fat=爆炸(“-”,$p_-fat);
$p_lmg=爆炸(“-”,$p_lmg);
$cliente=爆炸(“,$p_nome);
$row=0;
//阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥·阿库维奥
$arquivo=fopen('file.txt','r');
//勒奥·孔杜多·阿奎沃
试一试{
如果(空($p_nome)){
抛出新异常(“空表单”);
}
$fileName='file.txt';
如果(!file_存在($fileName)){
抛出新异常(“未找到文件”);
}
//阿奎沃无模式(第2段)
$arquivo=fopen($fileName,“r”);
如果(!$arquivo){
抛出新异常(“文件打开失败”);
} 
而(!feof($arquivo)){
//穆斯特拉·乌马·林哈·多·阿奎沃
$linha=fgets($arquivo,1024);
$colunas=explode(“;”,$linha,8);
foreach($colunas as$key=>$conteudo){
如果($row==0&&$key==p_lmg[1]){
$lmg=数字_格式($conteudo,2,',',');
} 
如果($row==$p_fat[1]){
如果($key==1)$de=number_格式($conteudo,2,',',');
如果($key==2)$ate=number_格式($conteudo,2',',',');
}
如果($row==$p_fat[1]&&$key==$p_lmg[1]){
$valorSeguro=数字_格式($conteudo,2,',',');
}
}   
$row++;
}
//阿奎沃阿贝托酒店
fclose($arquivo);
$\会话[“faturamento”]=“De R$$De atéR$$ate”;
$_会话[“lmg”]=$lmg;
$\会话[“valorSeguro”]=$valorSeguro;
$_会话[“客户”]=$cliente[0];
$_SESSION[“telefone”]=$p_telefone;
}捕获(例外$e){
回应“问题!!”;
}   
如果(!empty($_SESSION[“faturamento”]){
montaTexto();
}
$textoEmail=“Nome:$p_Nome\n Telefone:$p_Telefone\n LMG:$LMG\n Faturamento:De R$$De atéR$$ate”;
试一试{
如果(空($p_nome)){
抛出新异常(“空表单”);
}
EnvieMail($textoEmail,$p_nome);
}捕获(例外$e){
回声“;
}
函数montaTexto(){
$texto1=“

”$_SESSION[“客户”]。
Sua cotaço ficou avaliada em:

”; $texto2=“

R$”$\u会话[“valorSeguro”]。“

”; $texto2=“

R$”$\u会话[“valorSeguro]”* *弗兰基亚

”; $texto3=“

Faturamento Anual
” .$\u会话[“faturamento”]。“
” “加兰提亚矿业有限公司(LMG)
R$”\U会议[“LMG”] .“

”; 回声$texto1.$texto2.$texto3; } 函数enviaEmail($textoEmail,$nome){ $para=”email@hotmail.com"; $headers=“From:$nome\r\n”。 “回复:$para\r\n”。 'X-Mailer:PHP/'.phpversion(); 试一试{ //邮件($para、$assunto、$textoEmail、$headers); 邮件($para,$assunto,$textoEmail); //回音“email trabalho”; }捕获(例外$e){ 回音“Não foi电子邮件!”; } } ?>