You are not logged in.

#1 2007-05-16 15:35:53

jasonkit
Member
Registered: 2007-05-16
Posts: 3

php problem

After installing php through pacman -S php
I can't not run a simple helloworld script

the script(helloworld.php) is just:
<?
echo "Hello World";
?>

while I run "php helloworld.php", it just give me the content of the script but not "Hello World" that I expected.
I have try to solve the problem, and I find that if I delete the /etc/php.ini, everything is correct. But I do need /etc/php.ini to configure the php and load the extension.  So how can I run the php script with the /etc/php.ini is loaded?

Offline

#2 2007-05-16 15:38:03

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: php problem

Your code is wrong. You have to use "<?php ... ?>".

Offline

#3 2007-05-16 15:48:25

jasonkit
Member
Registered: 2007-05-16
Posts: 3

Re: php problem

Thank you very much, it works!
but dosen't php supports both <? ... ?> <?php ... ?>
or I can set this in the php.ini ?

Offline

#4 2007-05-16 15:55:16

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: php problem

Yes you can (I think it`s called asp-like tags). But you shouldn`t do that. ;-)

Last edited by Pierre (2007-05-16 15:55:32)

Offline

#5 2007-05-16 15:57:42

jasonkit
Member
Registered: 2007-05-16
Posts: 3

Re: php problem

Thanks again!

Offline

Board footer

Powered by FluxBB