note 129999 added to function.chown
| From: | mindlessconsumer+phpnet@gmail.com | Date: | Tue, 28 Jan 2025 07:22:07 +0000 |
| Subject: | note 129999 added to function.chown | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221817@lists.php.net to get a copy of this message | ||
It may be worth making explicitly clear that, while the shell's
chown command
allows both user and group to be set in one system call like this chown username:groupname
filename, PHP's version unfortunately does not:
<?php
// This will not work.
chown($filename, 'username:groupname');
// You have to use two separate calls.
chown($filename, 'username');
chgrp($filename, 'groupname');
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.84.18 (proxied: 74.65.201.237)
----
Manual Page -- https://php.net/manual/en/function.chown.php
Edit -- https://main.php.net/note/edit/129999
Del: integrated -- https://main.php.net/note/delete/129999/integrated
Del: useless -- https://main.php.net/note/delete/129999/useless
Del: bad code -- https://main.php.net/note/delete/129999/bad+code
Del: spam -- https://main.php.net/note/delete/129999/spam
Del: non-english -- https://main.php.net/note/delete/129999/non-english
Del: in docs -- https://main.php.net/note/delete/129999/in+docs
Del: other reasons-- https://main.php.net/note/delete/129999
Reject -- https://main.php.net/note/reject/129999
Search -- https://main.php.net/manage/user-notes.php