Como fazer issoo ???
Criar Diretorios
Started By Dani_sk8, 10/06/2004, 14:53
3 replies to this topic
#1
Posted 10/06/2004, 14:53
Como que eu faço p/ criar diretorios com o PHP, e como que eu faço para ele abrir a pasta e pegar os arquivos no meu kso eu queria que ele pegasse as figuras...
Como fazer issoo ???
Como fazer issoo ???
#2
Posted 10/06/2004, 15:02
Use:
| PHP |
<? if(mkdir("pasta/","0777")) { print("Pasta criada."); } else { print("Pasta não criada."); } ?> |
Para ler os arquivos, use o comando fopen().
#3
Posted 10/06/2004, 15:06
para abrir a pasta e ver os arquivos que tem nela, a base é esta aki:
<?
$handle = opendir("endereco_da_imagem");
while (false !== ($file = readdir($handle)))
{
print $file."<BR>";
}
?>
<?
$handle = opendir("endereco_da_imagem");
while (false !== ($file = readdir($handle)))
{
print $file."<BR>";
}
?>
#4
Posted 10/06/2004, 23:35
Pode-se também ver as pastas e os arquivos juntos:
<?php
$dir = dir("SeuDir");
while (false !== ($arq = $dir->read())) {
echo $arq."<br>\n";
}
$dir->close();
?>
Top 5 Iron Maiden:
1 - The Number of the Beast
2 - Run to the Hills
3 - Dance of the Death
4 - Rainmaker
5 - Ghost of the Navigator
Up the Irons!
1 - The Number of the Beast
2 - Run to the Hills
3 - Dance of the Death
4 - Rainmaker
5 - Ghost of the Navigator
Up the Irons!
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)











