Brimbox Logo Brimbox Version 2.3.4 Released

replace_root>>

Method to alter the beginning of a file path.

Class: bb_main, called as $main

File: bb_main.php (php)

Declaration:

function replace_root($dir, $search, $replace)

Usage:

$new_path = $main->replace_root($dir, $search, $replace);

Returns: directory and file path having $search replaced at the beginning of the input string with $replace.

Parameter: $dir (string)
Input path to be modified at the beginning.

Parameter: $search (string)
Beginning part of directory path (ie $dir) to be replaced.

Parameter: $replace (string)
Replacement string used to replace $search at beginning of input string.

Updated: 2016-06-16