Jump to content

My php won't php


parapet74

Recommended Posts

Php code is not being executed. My config:

 

WinXP

P5 2Gb/500Gb

XAMPP (latest DL) -- also tried with WAMPSERVER (latest DL)

Firefox, Chrome, Opera and Safari (all current)

 

 

HTML renders, but php is skipped.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
       <meta http-equiv="Content-Type" content="text/html;
       charset utf-0" />
       <title>SESSIONS TUTORIAL</title>
</head>
<body>
<h2>This displays correctly</h2>
<br>
<p>
<?php
echo "This does not display" ;
?>
</p>

</body>
</html>

 

I have tried:

- switching from WAMP to XAMPP and back

- reinstall each of the above (just the "out of box" config, but ensured Apache is running)

- full reimage/restore of C:, then reinstall each of the above

- tried in all browsers

- <?php ... ?> (using long tags)

- with / without semi-colon after echo statement

 

I'm new to PHP and to programming, so I'm probably missing something embarrassingly basic. Either in the code, or in my WAMP setup.

 

Au secours?

Link to comment
Share on other sites

Thanks for the speedy reply.

 

Yes to all of your questions.

 

EXCEPT... as I'm thinking about it... the third one.

 

I was entering this address into the address bar:

 

file:///c:/xampp/htdocs/killerphp/index.php

 

-- which *is* on my localhost... but your reply got me thinking... Typing http://localhost/killerphp/index.php worked.

 

Embarrassingly basic. Thanks for the brain nudge.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...