Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> tworzenie katalogu, poprawnie?
awariat
post
Post #1





Grupa: Zarejestrowani
Postów: 37
Pomógł: 0
Dołączył: 21.06.2008

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


czy ten kod jest poprawnie napisany?

CODE
$katalog = $_POST['katalog'];
$oldumask = umask(0);


if (file_exists($katalog)) {
echo "error=file $katalog exists&end=0";
} else {
if (!mkdir($katalog, 0777, true)) {
echo "error=Couldn't create directory $katalog&end=0";
} else {

echo "error=utworzono $katalog&end=0";
}
}
umask($oldumask);
?>
Go to the top of the page
+Quote Post

Posty w temacie


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: 28.09.2025 - 14:12