Page 2 of 2

Posted: Thu Feb 22, 2007 6:02 pm
by volka
try

Code: Select all

<?php
echo 'enter a number: ';
$number = (float)fgets(STDIN);
echo '->', $number;
?>

Posted: Thu Feb 22, 2007 6:11 pm
by ms_dos10
sorry man , but i have more question .
STDIN , STDOUT and STDERR what's means?
can i run html file on command line if yes how ?
thanx for everything

Posted: Thu Feb 22, 2007 6:13 pm
by volka
ms_dos10 wrote:STDIN , STDOUT and STDERR what's means?
http://en.wikipedia.org/wiki/Standard_streams
ms_dos10 wrote:can i run html file on command line if yes how ?
I don't understand what you're asking.

Posted: Thu Feb 22, 2007 6:19 pm
by ms_dos10
when i execute html file nothing well happen only the code show up on the screen as it's
is this way correct i can't execute it or i'm doing the wrong way

Posted: Thu Feb 22, 2007 6:21 pm
by nickvd
Why would you use HTML on the command line?

Posted: Thu Feb 22, 2007 6:29 pm
by ms_dos10
this is my first time using php on the command line . i thing from ur question i'm wrong .
i get this also from ur question php on command line act like c or c++ . no web coding "HTML" , is that correct .
if there is no web coding how can i make form for my user interface to enter data or i have to use the black screen
i know my question is more but i want to learn man

Posted: Thu Feb 22, 2007 6:38 pm
by volka
You might be interested in http://gtk.php.net/

Posted: Thu Feb 22, 2007 6:42 pm
by Weirdan
you might want to look into ncurses for somewhat prettier console user interface (though it is available for Win platform only if you have installed cygwin).

Posted: Thu Feb 22, 2007 6:43 pm
by ms_dos10
thanx all of you , i'll check this out and say my opinion on it .
thanx again

Posted: Fri Feb 23, 2007 1:15 am
by ryuuka
working with php in the command line essentially works like this:

C:\php\php.exe D:\scripts\php-script\thingy.php

first you you give the path to the php executable and then you give the path to the php script.

that's how i do it at least

Posted: Fri Feb 23, 2007 4:20 am
by dude81
Search for PHP STDIN, that could be of help. One such link here
STDIN