Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   Chmod (http://www.programmingforums.org/showthread.php?t=1443)

dnathe4th Dec 6th, 2004 6:29 AM

CHMOD in PHP is simple right?
CHMOD($filename, $permissions);


but then I can't figure out why this doesn't work
:

<?
if(!chmod("test.txt", 0777))
{
echo "dood no good";
}
else
{
echo "yay";
};
?>


tempest Dec 6th, 2004 7:14 AM

:

<?
if(!chmod("test.txt", 0777))
{
echo "dood no good";
}
else
{
echo "yay";
}; // <---------- Whats that?
?>


Fixed -\/

:

<?php
if(!chmod("test.txt", 0777)) {
  echo "dood no good";
} else {
  echo "yay";
}
?>


Pizentios Dec 6th, 2004 10:25 AM

Don't think that you can, only mods can, which one do you want deleted?

tempest Dec 6th, 2004 9:43 PM

The one in which i ask how to delete a post, and this one..

dnathe4th Dec 7th, 2004 9:07 PM

still no beans, its still telling me it doesnt work. I'm really stumped

elitecodex Dec 10th, 2004 9:51 AM

What is the error message? What OS and PHP version are you running?

kurifu Dec 13th, 2004 3:42 AM

Not working as in not executing, or not working as in the file just does not change permission?

If it is the later one, make sure that your script is executing as a user who has permission to change the file permissions.


All times are GMT -5. The time now is 3:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC