Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 6th, 2004, 5:29 AM   #1
dnathe4th
Programmer
 
Join Date: Oct 2004
Posts: 32
Rep Power: 0 dnathe4th is on a distinguished road
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";
};
?>
__________________
&lt;CENTER&gt;<span style='font-size:17pt;line-height:100%'>My Homepage</span>&lt;/CENTER&gt;
dnathe4th is offline   Reply With Quote
Old Dec 6th, 2004, 6:14 AM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
<?
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";
}
?>
__________________

tempest is offline   Reply With Quote
Old Dec 6th, 2004, 9:25 AM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Don't think that you can, only mods can, which one do you want deleted?
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Dec 6th, 2004, 8:43 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
The one in which i ask how to delete a post, and this one..
__________________

tempest is offline   Reply With Quote
Old Dec 7th, 2004, 8:07 PM   #5
dnathe4th
Programmer
 
Join Date: Oct 2004
Posts: 32
Rep Power: 0 dnathe4th is on a distinguished road
still no beans, its still telling me it doesnt work. I'm really stumped
__________________
&lt;CENTER&gt;<span style='font-size:17pt;line-height:100%'>My Homepage</span>&lt;/CENTER&gt;
dnathe4th is offline   Reply With Quote
Old Dec 10th, 2004, 8:51 AM   #6
elitecodex
Newbie
 
Join Date: Dec 2004
Location: DC Metro Area
Posts: 3
Rep Power: 0 elitecodex is on a distinguished road
Send a message via AIM to elitecodex Send a message via MSN to elitecodex
What is the error message? What OS and PHP version are you running?
elitecodex is offline   Reply With Quote
Old Dec 13th, 2004, 2:42 AM   #7
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
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.
__________________
Clifford Matthew Roche &lt;geek@cliffordroche.com&gt;
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:16 AM.

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