Sacado de
Php & MySQL: The Missing Manual :
Código PHP:
Ver original<?php
echo "Hello there. So I hear you're learning to be a PHP programmer!\n";
echo "Why don't you type in your name for me:\n";
echo "\nThanks, " . $name . ", it's really nice to meet you.\n\n";
?>
Se supone que pide el nombre del usuario y entrega un mensaje de bienvenida personalizado. Pues no, esto es lo que me aparece:
Hello there. So I hear you're learning to be a PHP programmer! Why don't you type in your name for me:
Notice: Use of undefined constant STDIN - assumed 'STDIN' in C:\xampp\htdocs\htdocs\php28\index.php on line 5
Warning: fgets() expects parameter 1 to be resource, string given in C:\xampp\htdocs\htdocs\php28\index.php on line 5
Thanks, , it's really nice to meet you.
¿Dónde está el fallo? Gracias, un saludo.