Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/07/2010, 14:52
L4NS
 
Fecha de Ingreso: mayo-2010
Mensajes: 99
Antigüedad: 13 años, 11 meses
Puntos: 1
Pregunta ayuda con error php en host 000webhost

Amigos bueno tengo el siguiente problema:

En mi localhost yo puedo permitir guardar links de fotos en un fichero de texto opina.txt, que se encarga de recibir los datos traidos desde un formulario con este codigo:

Código PHP:
<?php session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<body>
<p align="center">
<script type="text/javascript"> 
window.location="javascript:history.go(-1)"; 
</script> 
<?php

$day 
= array("Monday"=>"Lunes""Tuesday"=>"Martes""Wendesday"=>"Miercoles""Thursday"=>"Jueves""Friday"=>"Viernes""Saturday"=>"Sabado""Sunday"=>"Domingo");
$dia date ("l");


$month = array("January"=>"Enero","February"=>"Febrero","March"=>"Marzo","April"=>"Abril","May"=>"Mayo","June"=>"Junio","July"=>"Julio","August"=>"Agosto","September"=>"Septiembre","October"=>"Octubre","November"=>"Noviembre","Dicember"=>"Diciembre");
$mes date("F");

$aniosdate("Y");

$numero=date("j");


  
$fecha "$day[$dia] $numero de $month[$mes] de $anios";
$hora=date("h:i a");
$comentario=$_POST['comentario'];
$USERNAME=$_SESSION['MM_Username'];

$NEWCOMENTARIO wordwrap($comentario30"\n"true);

$fp fopen("opina.txt","a");
$salida "<table width='449' border='1' cellpadding='2' cellspacing='1' bordercolor='white' bgcolor='#000000'>
  <tr>
    <td width='137' rowspan='2'><div align='center'><b><font color='#33CCFF'>Fecha:</font></b><font color='white'> $fecha a las $hora</font></div></td>
    <td width='312'><div align='center'><b><font color='#33CCFF'>Nombre:</font></b><font color='white'> $USERNAME</font></div></td>
  </tr>
  <tr>
    <td><div align='center'><b><font color='#33CCFF'>Comentario:</font></b><font color='white'> $NEWCOMENTARIO</font></div></td>
  </tr>
</table>"
;
fwrite($fp,$salida);
fclose($fp);

?>
</p>

</body>

</html>
En mi localhost funciona normal pero cuando lo subi al servidor 000webhost.com me lanza el siguiente error:

Warning:fopen(opina.txt) function fopen. failed to open stream permision denied in home/Eopina.php on line 36!

que es esta linea:

$fp = fopen("opina.txt","a");

y este otro error

Warning fwrite() suplied argument is not a valid stream resource in home/Eopina.php on line 46 que es esta:

fwrite($fp,$salida);

Por Favor Ayudenme!