Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Erro:
Warning: fopen(fotos.xml) [function.fopen]: failed to open stream: Permission denied in /home/aposinve/public_html/album/index.php on line 8
Warning: fwrite(): supplied argument is not a valid stream resource in /home/aposinve/public_html/album/index.php on line 10
Warning: fwrite(): supplied argument is not a valid stream resource in /home/aposinve/public_html/album/index.php on line 11
Warning: fwrite(): supplied argument is not a valid stream resource in /home/aposinve/public_html/album/index.php on line 34
Warning: fwrite(): supplied argument is not a valid stream resource in /home/aposinve/public_html/album/index.php on line 35
OBS: apesar de ser warning ele "printa" na tela...
Code:
<?php
ob_start();
$dir = "images";
$conteudo = "";
$exts = array('jpg','png','jpeg','gif');
$arquivo = "fotos.xml";
$ponteiro = fopen($arquivo, "w");
fwrite($ponteiro, "<?xml version=\"1.0\"?>\n");
fwrite($ponteiro, "<galeria>\n");
if (is_dir($dir)) {
if ($d = opendir($dir))
{
while (($file = readdir($d))!== false)
{
if (filetype($dir.'/'.$file) == 'file')
{
$extensao = explode(".", $file);
for($i=0; $i<=count($exts)-1; $i++)
{
if($extensao[1] == $exts[$i])
{
$conteudo .= "<fotos gde=\"$dir/{$file}\"/>\n";
}
}
}
}
closedir($d);
}
}
fwrite($ponteiro, $conteudo);
fwrite($ponteiro, "</galeria>\n");
ob_flush();
?>
<html>
<head>
<title>F&G .:. Album de fotos</title>
<style>body{margin:0px;}</style>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0) width="780" height="600">
<param name="movie" value="flash/galleryhorvert.swf">
<embed src="flash/galleryhorvert.swf" pluginspage="[http://www.macromedia.com/go/getflashplayer"](http://www.macromedia.com/go/getflashplayer) type="application/x-shockwave-flash" width="780" height="600"></embed>
</object>
<!-- <embed
src="flash/galleryhorvert.swf"
width="100%" height="630"
quality="high"
bgcolor="#FFFFFF"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">-->
</body>
</html>
Sendo que o index, esta com 777 rwx,rwx,rwx...
Alguem pdoe me ajudar?
Carregando comentários...