- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
umask() function in PHP
The umask() function changes permissions for files. It returns the current umask is it is set without arguments.
Syntax
umask(mask)
Parameters
mask − Set the new permission.
Return
The umask() function returns the current umask is it is set without arguments.
Example
<?php // -rw------- umask(0077); // access changed: -rw-r--r-- chmod('/new/one.txt', 0644); echo “Access changed!”; ?>
Output
Access changed!
Advertisements
To Continue Learning Please Login
Login with Google