Toon posts:

[php] ineens kan ik geen dir meer maken

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo, een tijdje geleden maakte ik via dit onderstaande
PHP:
1
<?if (file_exists ("../../../partycenter/zalen/$field[naam]") ) {      }      else {            //dir aanmaken      mkdir("../../../partycenter/zalen/$field[naam]");      }            $dir = "../../../partycenter/zalen/$field[naam]";            $foto1 = $_FILES['upload']['name'][1];      $foto2 = $_FILES['upload']['name'][2];      $foto3 = $_FILES['upload']['name'][3];      $foto4 = $_FILES['upload']['name'][4];      move_uploaded_file($upload[1], $dir.'/'.$_FILES['upload']['name'][1]);      move_uploaded_file($upload[2], $dir.'/'.$_FILES['upload']['name'][2]);      move_uploaded_file($upload[3], $dir.'/'.$_FILES['upload']['name'][3]);      move_uploaded_file($upload[4], $dir.'/'.$_FILES['upload']['name'][4]);?>

een dir aan en plaatste ik alle foto's horende bij dit item in de aangemaakt dir.

Ik ben nu net terug van vakantie en zie tot mijn grote schrik ineens deze fouten:

Warning: Wrong parameter count for mkdir() in /home/sites/site39/web/support/cms/zalen/toevoegen.php on line 50

Warning: Unable to create '../../../partycenter/zalen/Test/jukebox.gif': No such file or directory in /home/sites/site39/web/support/cms/zalen/toevoegen.php on line 60

Warning: Unable to move '/tmp/php5JyrpX' to '../../../partycenter/zalen/Test/jukebox.gif' in /home/sites/site39/web/support/cms/zalen/toevoegen.php on line 60

Hoe kan dat?

  • Rashann
  • Registratie: Maart 2000
  • Laatst online: 24-08 07:20

Rashann

Zoek de hond...

[url="http://www.php.net/manual/en/function.mkdir.php"]Klik[/url]

Moeilijk hoor... je mist wat parameters (Duh!)

If nothing is written below, I was the last to reply...


Verwijderd

Topicstarter
thx

heb nu ook 0700 maar dan kan ik niet in de dir kijken :p

kan ik dat wel met 755 dus dat ik de map niet 777 hoef te maken.

  • sebas
  • Registratie: April 2000
  • Laatst online: 16-12-2025
Voordat er een slotje opgaat omdat dit wel heeeeeeeel makkelijk is ...

Het volgende is essentieel om te begrijpen als je met het filesystem wilt werken zonder tegen dit soort basale dingen telkens weer tegen te komen. (google wil ook wel eens helpen, trouwens)
UNIX systems divide the world into three classes when determining the permissions that a user is granted for a particular file:

*

User - the owner of the file
*

Group - a collection of users defined in /etc/group
*

Others - neither the owner, nor a member of the group

Every file in a Unix filesystem has a permission definition associated with it. At a minimum, the permission established for a file will determine whether a particular user may READ, WRITE, or EXECUTE the file in question. A directory listing will show the permissions associated with a file in the format shown below:
code:
1
2
3
4
5
  rwx  r-x  r-x
   |    |    |
   |    |    |_____________ Others:  READ/NO WRITE/EXECUTE
   |    |__________________ Group:   READ/NO WRITE/EXECUTE
   |_______________________ User:    READ/WRITE/EXECUTE
In the sample directory listing shown below, READ/WRITE/EXECUTE privileges are granted to the owner of the directory, and READ/EXECUTE privileges are granted to members of the users group and everyone else. Note the letter "d" at the beginning of each entry, denoting that the entry is actually a directory.
code:
1
2
3
4
5
6
7
8
9
10
11
  prince> ls -l /home/ftp

  total 8
  drwxr-xr-x    2 andrea   users      4096 May  3 00:40 andrea
  drwxr-xr-x    2 eve   users     4096 May  3 00:40 eve

  prince> ls -l /home/ftp/andrea 

  total 156
  -rw-r--r--    1 andrea   users     85991 May  3 01:12 bland.txt
  -rwxr-xr-x    1 root     root   65107 May  3 01:12 secret.txt
The answer to this question is shown in the above example. When describing the permissions associated with a directory, WRITE means that permission is granted to modify the contents of a directory by adding or deleting files. Thus, the user andrea may delete the file secret.txt, even though she cannot modify the file itself.
[edit] wat ubb code netter gemaakt ...

Everyone complains of his memory, no one of his judgement.