Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> nie działa mi skrypt :/
-krasz-
post
Post #1





Goście







mam taki skrypt


  1. <?php 
  2. echo &#092;"<form action='plik.php' method='post'>\"
  3.  .&#092;"<input name='file' type='text'>\"
  4.  .&#092;"<input type=submit value='zapisz'></form>\";
  5.  
  6.  if (isset ($_POST[&#092;"file\"])) {
  7.  
  8.  $file=&#092;"/\".$_POST[\"file\"];
  9.  $dir=getcwd();
  10. echo &#092;"<b>$file</b><br>\";
  11.  echo &#092;"$dir<br>\";
  12. echo &#092;"$dir$file<br>\";
  13.  
  14. mkdir (&#092;"$dir$file\") or die (\"nie udało sie\");
  15. chmod (&#092;"$dir$file\",0777);
  16. mkdir (&#092;"$dir$file/katalog\") or die (\"nie udało sie\");
  17. chmod (&#092;"$dir$file/katalog\",0777);
  18.  
  19.  
  20. }
  21.  
  22. ?>



tworzy mi katalog który zostanei wyciągnięty z formularza, zmienia mu prawa atrybuty, ale druga instrukcja nie tworzy katalogu i wyświetla komunikat.
co może być przyczyną?

---
Ja Ci tu dam mi to w [CODE] dawac :-) powinno byc w [php]
hwao
Go to the top of the page
+Quote Post
vala
post
Post #2





Grupa: Zarejestrowani
Postów: 123
Pomógł: 0
Dołączył: 12.01.2005

Ostrzeżenie: (0%)
-----


nie chce mi sie tego testowac ale na moje oko to powinno byc tak
Kod
mkdir ("$dir$file"."/katalog") or die ("nie udało sie");


Ten post edytował vala 22.03.2005, 21:43:11
Go to the top of the page
+Quote Post
-Guest-
post
Post #3





Goście







nic to nie dało...
Go to the top of the page
+Quote Post
Wave
post
Post #4





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 13.01.2005

Ostrzeżenie: (0%)
-----


  1. <?php
  2.     
  3. mkdir ($dir.$file, 0777) or die ('nie udało sie');
  4. mkdir ($dir.$file.'/katalog', 0777) or die ('nie udało sie'); 
  5.  
  6. ?>

Podstawy php.

Ten post edytował Wave 24.03.2005, 09:32:10
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 12:58