Robie taa funkcje:
<?php function ConvertChmod($chmod) { if($number_chmod[0] == 4) $string_chmod .= 'r'; else if($number_chmod[0] == 5) $string_chmod .= 'rx'; else if($number_chmod[0] == 6) $string_chmod .= 'rw'; else if($number_chmod[0] == 7) $string_chmod .= 'rwx'; if($number_chmod[1] == 4) $string_chmod .= 'r'; else if($number_chmod[1] == 5) $string_chmod .= 'rx'; else if($number_chmod[1] == 6) $string_chmod .= 'rw'; else if($number_chmod[1] == 7) $string_chmod .= 'rwx'; if($number_chmod[2] == 4) $string_chmod .= 'r'; else if($number_chmod[2] == 5) $string_chmod .= 'rx'; else if($number_chmod[2] == 6) $string_chmod .= 'rw'; else if($number_chmod[2] == 7) $string_chmod .= 'rwx'; return $string_chmod; } //Wywoluje $b = ConvertChmod(644); ?>
I nic sie nie dzieje a te print_r w funkcjo zwracaja takie cos:
<?php 644Array ( [0] => 644 ) ?>
Czyli explode() nie dzieli tego chmod'a tak jak bym chcial poniewaz jest to int jak to poprawic lub wiem moglbym napisac wszytkie mozliwe kombinacje chmod'ow a nie pojedyncze cyfry ale nie chce.
Niby banalne ale cos mi nie wychodzi mam normalnie do funkcji dac jako argument tablice?Albo jak to inacze napisac?