roja...@gmail.com
unread,Dec 31, 2007, 10:39:07 AM12/31/07Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Connecticut PHP Developers Group - CPDG
The chmod command (abbreviation of change mode) is a unix command that
will allow to change permissions of a file. This is a very useful when
working with OSCommerce and any application that writes the
configuration files. For security reason you will want to change the
permission to read only.
PHP will allow you to perform this with the native chmod() function.
This function requires 2 parameters to work. The file to change and
the mode (permission).
chmod(string $filename, int $mode)
Lets make a real example here. You want to change the mode to read
only on configuration.php
<?php
chmod('/home/~user/public_html/configuration.php', 0444);
?>