FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Version 5.3.6
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Version 5.3.6: confusing CLI [message #177111 is a reply to message #177108] Wed, 22 February 2012 15:49 Go to previous messageGo to previous message
SL is currently offline  SL
Messages: 20
Registered: February 2012
Karma:
Junior Member
> You must start your script with <?php and end it with ?>. You can then
> invoke it like this:
>
> # php -q myscript.php
>
> You can also put a shebang line before the opening <?php, like this:
>
> #!/usr/bin/php -q
> <?php
> echo "123 cli\n";
> echo "Date: " . date("Y.m.d H:i:s");
>>
>
> Then if you chmod +x the file, you can invoke it directly like this:
>
> # ./myscript.php
>

Hi folks, this 'out of memory' thing, how to deal with it ?

My "aa2.php':

#!/usr/bin/php -q

<?php

echo "123 cli\n";

echo "Date: " . date("Y.m.d H:i:s");

?>

See log:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2012.02.22 23:39:21
=~=~=~=~=~=~=~=~=~=~=~=

login as: neighbr or

neighbor(at)neighborhood-trotter(dot)com's password:

Last login: Wed Feb 22 22:23:31 2012 from 113.210.97.23 -jailshell:
/etc/init.d/msm_profile: No such file or directory

neighbor(at)neighborhood-trotter(dot)com [~]# php -q public_html/aa2.php

Out of memory

neighbor(at)neighborhood-trotter(dot)com [~]# logout
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: jailshell and PHP daemon
Next Topic: way to turn off strict option? Use of undefined constant
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 08:35:44 GMT 2024

Total time taken to generate the page: 0.04260 seconds