PHP - AYUDA CON ESTE CODIGO...

 
Vista:
Imágen de perfil de Victorio
Val: 56
Ha aumentado su posición en 3 puestos en PHP (en relación al último mes)
Gráfica de PHP

AYUDA CON ESTE CODIGO...

Publicado por Victorio (29 intervenciones) el 21/02/2017 19:12:43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
	$content = "";
	$archivo = fopen("archivo.txt", "a");
		if(isset($_POST["msg"])){
			$msg = $_POST["msg"];
			fputs($archivo, $msg);
			unset($_POST);
			while(false === feof($archivo)){
				$content = $content.fgets($archivo);
			}
			fclose($archivo);
		}
		else
			;
?>
 
<!DOCTYPE html>
<html>
<head>
	<title>Chat</title>
	<meta charset="UTF-8">
	<style type="text/css">
		.msg{
			background-color: black;
			color: lime;
			width: 500px;
			height: 500px;
		}
		.btn{
			width: 500px;
			height: 50px;
			font-size: 40px;
		}
		.writer{
			display: inline-block;
			float: left;
		}
		.shower{
			display: inline-block;
			height: 600px;
			width: 700px;
			margin-left: 100px;
			background-color: black;
			color: aqua;
		}
	</style>
</head>
<body>
<div>
	<div class="writer">
	<form action="" method="POST">
		<textarea name="msg" class="msg"></textarea>
		<br><br>
		<input type="submit" value="COMPILE" class="btn">
	</form>
	</div>
	<div class="shower">
		<?php
			echo $content;
		?>
	</div>
</div>
</body>
</html>



LA WEB NO CARGA CUANDO CLICKEO EN EL SUBMIT
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

AYUDA CON ESTE CODIGO...

Publicado por xve (6935 intervenciones) el 21/02/2017 19:31:41
Hola Victorio, viendo el código, me sobra la linea 13 y 14... puedes quitarlas y probar?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar