Answer the question
In order to leave comments, you need to log in
Why does rmdir() "execute" about a non-empty directory?
Hello!
Never used rmdir before.
Does the line have the right to life
if (rmdir(pathinfo($mod_path, PATHINFO_DIRNAME))){ return true; }
? function my_func($mod_name, $mod_path, $ajax=false){
require ('../core/includes_php/rotator_configData.php');
$module_remove = new mysqli(DB_SERV, DB_USER, DB_PASS, DB_BASE);
if ($module_remove -> connect_error) {return( $module_remove -> connect_error); }
$result = $module_remove->query("SET NAMES 'utf8'");
$result = $module_remove->query("DELETE FROM `blablabla`';");
//if (!$result) { return $module_remove->error; }
if ($result && rmdir(pathinfo($mod_path, PATHINFO_DIRNAME))){ return true; }
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question