logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Explain the changing file permission and ownership using PHP's chmod() function.


  • Correct Answer
  • Chmod() is used for changing permissions on a file Syntax: Chmod(file, mode) Mode here specifies the permissions as follows: The first number is always zero The second number specifies permissions for the owner The third number specifies permissions for the owner's user group The fourth number specifies permissions for everybody else Possible values (to set multiple permissions, add up the following numbers) 1 = execute permissions 2 = write permissions 4 = read permissions Example: // everything for owner, read for owner's group chmod("testtxt",0740); 


  • Technology problems


    Search Results


    • 1. How can we encrypt the username and password using PHP?
    • Discuss
    • 2. What Is a Session in PHP?
    • Discuss
    • 3. How to set cookies in PHP?
    • Discuss
    • 4. Explain when to use GET or POST. Provide example for both the ways.
    • Discuss
    • 5. What type of inheritance that PHP supports? Provide an example.
    • Discuss
    • 6. Explain the working with directories using opendir(), readdirs(), closedir() along with examples.
    • Discuss
    • 7. What is the difference between using copy() and move() function in php file uploading?
    • Discuss
    • 8. What is the difference between mysql_connect and mysql_pconnect?
    • Discuss
    • 9. What do you mean by a deadlock?
    • Discuss
    • 10. What is Control File used for?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment