Hey Guys, I hope you guys can help me. I am trying to create a variable that will hold the default file permission for the chmod. For example: $chmod_perm = 0755; $chmod($file, $chmod_perm); My problem is that $chmod_perm becomes a long type and the number changes. I also tried using decoct() but just returns 755. Chmod requires the parameter to be 0755 or else it doesn't work. Thanks in advance.
A bit overkill but solves your tricky problem <?php // ftp connect.... $chmod_perm = '0755'; $file_path = '/uploads/'; ftp_site($ftpconn, "CHMOD {$chmod_perm} {$file_path}"); ?> PHP:
I'll just stick with specifying it manually. I figured someone would had a solution for this. Thanks guys.