Jump to content

need help fast


tas

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

Link to comment
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.
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.