I am trying to do the following search and replace, but for some reason it is not working. I am trying to replace:
require_once('
with
require_once($_SERVER['DOCUMENT_ROOT']/'
These are exact tags (slash and single quote are included).
This is what I tried, but I can't get it to work:
find ./ -type f -readable -writable -exec sed -i "s/require_once(\'/require_once($_SERVER['DOCUMENT_ROOT'] . \'\//g" {} \;
What am I doing wrong?
source share