You are here: Re: command-line php displays code instead of executing code « PHP Programming Language « IT news, forums, messages
Re: command-line php displays code instead of executing code

Posted by Paul Lautman on 01/28/07 20:18

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, but
>>>>> instead of executing my script, it's actually displaying the raw
>>>>> code instead.
>>>>> How can I run my code using CLI PHP? I installed WAMP5 on WinXP.
>>>>> Thanx
>>>>> Phil
>>
>>> php example.php
>>>> Your code must be surrounded with <?php and ?>, just like in a web
>>>> page.
>>
>>> install.php is indeed surrounded with PHP tags, just like in a web
>>> page. As I can see when I do "php -q install.php" and see the
>>> source code instead of the executions.
>>
>>> Phil
>>
>>>> --
>>>> ==================
>>>> Remove the "x" from my email address
>>>> Jerry Stuckle
>>>> JDS Computer Training Corp.
>>>> jstuck...@attglobal.net
>>>> ==================Then it should work. Or at least it does on
>>>> every system I've used.
>>
>> But since you haven't posted the script or anything else about your
>> 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"
>
> Phil
You said earlier that your code was "surrounded with PHP tags", but what you
have posted has no ending tag.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация