Hello Reader's If you want to get the full path , name or the directory of a file using php then you can use the code below:-
Let's see the example below:-
function filePathParts($arg1) {
echo $arg1['dirname'], "\n";
echo $arg1['basename'], "\n";
echo $arg1['extension'], "\n";
echo $arg1['filename'], "\n";
}
filePathParts($xmlFile);
?>
Now the output of the file will be:-
/usr/admin/config
test.xml
xml
test
So by doing above code you can get diffrent information of a file
0 Comment(s)