You are here: Re: Wet behind the ears newbie « PHP Programming Language « IT news, forums, messages
Re: Wet behind the ears newbie

Posted by Jerry Stuckle on 08/28/06 12:55

Erwin Moller wrote:
> Hot cat wrote:
>
>
>>Howdy all,
>>
>>I just installed php 5 in fedora core 4 and have just written a the first
>>scrip[t that comes in the "man php" (echo "hello world") from the command
>>line.
>>
>>I tried to execute
>>#!/bin/php
>><?php
>> print ("hello world");
>>?>
>
>
> Hi Hotcat,
>
> When you say you 'installed php' does that mean you set up PHP so it is
> intergrated in apache?
> Because the example you give is CGI-like call to PHP.
> Not many use PHP that way. I am even uncertain if that still works..
>

Actually, there are a lot of people who use PHP that way. And it works
fine.

> So unless you have some exotic setup for some reason, start using PHP via
> your browser.
>
> A typical PHP file does NOT contain the bash instruction #!/bin/php.
> It starts like this:
> <?php
> phpinfo();
> ?>
>
> and you call it via your webbrowser:
> http://localhost/myphptest.php
>
>
> Or if you call it via commandline:
> /pathtophp/php myTest.php
>

Not needed if you use the method above. But you have to be pointing to
a valid php executable.

>
> Hope that helps.
>
> If it does not, come back here.
>
> Regards,
> Erwin Moller
>
>
>>I get bash errors and it won't run.
>>Same when I tried to place a few simple "hello worlds" in a piece
>>of html that I \itried to run on Friefox. Whats the story do I have to
>>fiddle with php.ini, install a plug in for Friefox?
>>
>>TIA
>
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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