PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$is_reachable = (stristr($dir_atual,$doc_root)!==false);
and:
$expanded_dir_list .= ":".$mat[$x];
the 2nd code was at a file manager script like this:
$mat = explode("/",$path_info["dirname"]);
for ($x=0;$x<count($mat);$x++) $expanded_dir_list .= ":".$mat[$x];
// are the contents of $doc_root inside of the $dir_atual variable?
// if so set $is_reachable to true, else false
$is_reachable = (stristr($dir_atual,$doc_root) !==false);
// add a : and the value of $mat[$x] to $expanded_dir_list
$expanded_dir_list .= ":".$mat[$x];
// split the path into chunks using / as a divider and place the pieces into an array
$mat = explode("/",$path_info["dirname"]);
// loop through each piece and add it to $exanded_dir_list prepending it with a :
for ($x=0;$x<count($mat);$x++) $expanded_dir_list .= ":".$mat[$x];