From: Libor on
Hi all,
I don't know if I am stupid or what but I can't find out how to send
typed code to execute.

> php.exe -a
Interactive mode enabled

Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!

(I am running PHP 5.3.0 on Win XP.)

Thanks
Libor
From: "Sascha Meyer" on
Hi Libor,

Libor wrote:
> Hi all,
> I don't know if I am stupid or what but I can't find out how to send
> typed code to execute.

I never worked with php as an interactive console application but as far as I can see on the php.net homepage [1], the -a switch is used to call a script which then takes direct user input from the console via STDIN stream instead of working with predefined variable values.

Regards, Sascha

[1] http://de.php.net/manual/en/features.commandline.php
--
GRATIS f�r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From: Shahar Evron on
Hi,

Did it just print out back the stuff you typed in?

When working with -a don't forget to add the opening '<?php' tag, just
like you would in a regular script.

BTW on *nix if you build PHP with gettext support there's real
interactive mode support (a command prompt, history, completion, and no
need to type the '<?php' stuff) but I'm not sure if that is available on
Windows.

Shahar.

On 27/12/09 17:05 PM, Libor wrote:
> Hi all,
> I don't know if I am stupid or what but I can't find out how to send
> typed code to execute.
>
> > php.exe -a
> Interactive mode enabled
>
> Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!
>
> (I am running PHP 5.3.0 on Win XP.)
>
> Thanks
> Libor
>
--
Shahar Evron <shahar.e(a)zend.com>

Product Manager
Zend Technologies

From: Libor Jelinek on
Hello Sascha,
yes, running "php -a" should await input from STDIN but it should
means keyboard. And I don't know how to end STDIN input from keyboard
(how to tell to php.exe "execute what I typed").

I am typing typing but I don't know how to force php to execute what I
typed on keyboard :-(

Thanks!
Libor


2009/12/27 Sascha Meyer <harlequin2(a)gmx.de>:
> Hi Libor,
>
> Libor wrote:
>> Hi all,
>> I don't know if I am stupid or what but I can't find out how to send
>> typed code to execute.
>
> I never worked with php as an interactive console application but as far as I can see on the php.net homepage [1], the -a switch is used to call a script which then takes direct user input from the console via STDIN stream instead of working with predefined variable values.
>
> Regards, Sascha
>
> [1] http://de.php.net/manual/en/features.commandline.php
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
From: Ferenc Kovacs on
php.exe -r "echo date('Y-m-d H:i:s');" works for me on windows.

Tyrael

2009/12/27 Libor <ljelinek(a)virtage.com>:
> Hi all,
> I don't know if I am stupid or what but I can't find out how to send typed
> code to execute.
>
>> php.exe -a
> Interactive mode enabled
>
> Pressing <Enter> or <Ctrl-D> didn't execute code. Please, help me!
>
> (I am running PHP 5.3.0 on Win XP.)
>
> Thanks
> Libor
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
 |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: cgi
Next: read an xml string from a form field