Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I'm quite new to all this stuff. I've got a problem POSTing a number from a form into $chmodsetting in order to use it with mkdir. This is the code:Code: Select all
<?php
$chmodsetting = $_POST["chmodsetting"];
mkdir($directoryname, $chmodsetting);
?>The form posts numbers like 0755 and 0777 etc, but mkdir creates the directory but set wrond chmod value.
I tried with something like this, but it just didn't work:
Code: Select all
<?php
if ($chmodsetting == "0755"){
$chmodsetting == 0755;} //(without the quotes, so it's not read as a string.)
?>Thanks
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]