chmod
-
PHP
chmod('/path/to/foobar', 0644);
Ruby
File.chmod('/path/to/foobar', 0644)
Notice the leading zero in both examples (
0644). Both PHP and Ruby have built-in support for octal numbers, the traditional way of representing file permissions on Unix-like systems. Be sure to include the leading zero so your results are as you intended.see also
Looking for Rails or PHP web application development, integration, and training?
Rails for PHP is brought to you by Maintainable Software. Get custom web applications and personalized training from the authors of the book and website.

