rtrim function doesn't work with ending h letter

前端 未结 5 825
感动是毒
感动是毒 2021-01-26 04:26
$file = \"refinish.php\";
$folder = rtrim($file, \".php\");
echo $folder; // refinis

where is ending h ?

I tried with some other

5条回答
  •  闹比i
    闹比i (楼主)
    2021-01-26 04:59

    $file = "refinish.php";
    $folder = str_replace('.','',rtrim($file, "php"));
    echo $folder; // refinis
    

提交回复
热议问题