Reply to Re: Wet behind the ears newbie

Your name:

Reply:


Posted by Erwin Moller on 08/28/06 11:07

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..

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


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

[Back to original 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

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