I have following code in php and I want make a simple directory with user defined permissions.
MakeDir("test",0777);
function MakeDir($dir,$mode=0777){
echo $mode;
mkdir($dir, $mode) ;
}
for 0777 function returns 511, and for 0666 it returns 438. How can I protect main input for chmode or mkdir command?
stringyfy your arguments like