|
Posted by Curtis on 02/01/07 02:35
On Sun, 28 Jan 2007 13:17:21 -0800, comp.lang.php =
<phillip.s.powell@gmail.com> wrote:
>
>
> On Jan 28, 3:34 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> comp.lang.php wrote:
>>
>> > On Jan 28, 2:56 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> >> comp.lang.php wrote:
>>
>> >>> On Jan 28, 1:58 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote=
:
>> >>>> comp.lang.php wrote:
>> >>>>> I am using CLI PHP to run a PHP script, c:\wamp\php\php.exe, bu=
t
>> >>>>> instead of executing my script, it's actually displaying the ra=
w =
>> code
>> >>>>> instead.
>> >>>>> How can I run my code using CLI PHP? I installed WAMP5 on WinX=
P.
>> >>>>> Thanx
>> >>>>> Phil
>> >>> php example.php
>> >>>> Your code must be surrounded with <?php and ?>, just like in a w=
eb =
>> page.
>> >>> install.php is indeed surrounded with PHP tags, just like in a we=
b
>> >>> page. As I can see when I do "php -q install.php" and see the =
>> source
>> >>> code instead of the executions.
>> >>> Phil
>> >>>> --
>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> >>>> Remove the "x" from my email address
>> >>>> Jerry Stuckle
>> >>>> JDS Computer Training Corp.
>> >>>> jstuck...@attglobal.net
>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DThen it sh=
ould work. Or at least it does on =
>> every system I've used.
>> >> But since you haven't posted the script or anything else about you=
r
>> >> installation, any answer is a guess.
>>
>> > I tried with a very simple one-liner script:
>>
>> > <?php
>>
>> > print_r("hello world");
>>
>> > ?>
>>
>> > And that is exactly what I see instead of "hello world"
>>
>> > PhilOK, and you are entering from a command line:
>>
>> php example.php
>>
>> -q shouldn't affect the execution of the program, but you should try
>> leaving it off.
>>
>> Also, ensure you don't have ANY other file with the filename "php" - =
it
>> could be php.exe, php.bat or php.com, for instance.
>
> Nope, all there is is php.exe, I checked
>
>>
>> --
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
What version of PHP are you using? If you're using PHP 4, then you need =
to =
use the php-cli.exe executable, rather than php.exe. Also, there is a CL=
I =
related DLL that needs to be in the same directory.
Also, is your PHP installation running on a server? If so, do you have t=
he =
same problem?
-- =
Curtis
Navigation:
[Reply to this message]
|