Remove Line from file using preg_replace

后端 未结 1 923
野趣味
野趣味 2021-01-25 16:43

I want remove this line from my config file

line :define(\'APP_MAIL_FROM_EMAIL_NAME\',\'example\');

Here is my code



        
相关标签:
1条回答
  • 2021-01-25 17:06

    Try this it will include all space between your character

    preg_replace('/define\(\'APP_MAIL_FROM_EMAIL_NAME.s+*\R/', '', $configFileContents);
    
    0 讨论(0)
提交回复
热议问题