Jump to content

Archived

This topic is now archived and is closed to further replies.

tas

need help fast

Recommended Posts

hey, im having lots of problems with php
the following php code

<?php
print ("hello world");
?>

for some reason outputs this:

hello world"); ?>

how can i get it to output just Hello World ?
id greatly appreciate any help on this as soon as possible as i have a project due today and
am having lots of trouble with the print statements.

also if i have a web page that has a link to a php file (say hello.php)
when i click on the link to it, it asks me to open/save the file and opens it in notepad
is there anything i have to install that stops this from happening and runs the php?
i have enclosed the php code in html this seems to be the only way of getting the page to load

Share this post


Link to post
Share on other sites
Basicaly it means that PHP hasnt been installed/configure properly with apache.. If you manualy installed it then go thru the documentation again and double check everything :)

Share this post


Link to post
Share on other sites
Thnx for that.
Its a college computer so im not sure whats installed but i would have thought it was
Is there any way to check if php is installed?

Share this post


Link to post
Share on other sites
Create a new php document with the following code.

[code]
<?php
phpinfo()
?>
[/code]

If php is configured it will show the php configuration selections and such.
If you don't see all the information, then something has gone wrong.
If so, I can only recommend what has already been said, go over the documentation of installation.

Share this post


Link to post
Share on other sites
You will have to load your pages through the browser with the httpd protocol like so:
[a href=\"http://localhost/pagename.php\" target=\"_blank\"]http://localhost/pagename.php[/a]

Or it may be like this:
[a href=\"http://localhost/~username/pagename.php\" target=\"_blank\"]http://localhost/~username/pagename.php[/a]

it depend on how your college server has been setup.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.