.php files execute, but embedded php scripts in HTML do not.

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
meatmuppet
-


Joined: 04 Feb 2004
Posts: 3
Location: Reno, NV

PostPosted: Fri Feb 06, 2004 3:06 am    Post subject: .php files execute, but embedded php scripts in HTML do not. Reply with quote

Here's a newbie question:

If I point my browser to a .php file, it executes just fine and my browser displays all the appropriate content.

When I add php scripts to an HTML document nothing happens. For example (simplified)...

<html><head><title>blah</title></head>
<body>
<?php
print "hello world";
?>
</body>
</html>

...does nothing. "Hello world" does not print to the screen. Nor is there an error message/notice of any kind. None of the other acceptable php tags work either--I've tried them all.
Did I miss a step in the php installation? Abyss config?

I appreciate any comments/help on this point!
Back to top View user's profile Send private message
marc2003
-


Joined: 04 Feb 2004
Posts: 15

PostPosted: Fri Feb 06, 2004 7:27 am    Post subject: Reply with quote

i know less than nothing about php but surely it only interprets php files although i believe there other options on php install. just do what everyone else does. rename all .htm files to .php
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Feb 06, 2004 4:23 pm    Post subject: Re: .php files execute, but embedded php scripts in HTML do Reply with quote

meatmuppet,

To have a file processed by PHP, it must have one of the extensions listed in the extensions associated with the PHP interpreter in the CGI Parameters.
By default, it should be .php (although the file contains some HTML).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
meatmuppet
-


Joined: 04 Feb 2004
Posts: 3
Location: Reno, NV

PostPosted: Sun Feb 08, 2004 9:21 am    Post subject: thank you, that worked Reply with quote

Marc2003 and aprelium,

That was the solution I've been looking for, thanks. I'm still very new at this, and haven't gotten all the "memos" :)
The SAMS book I'm using doesn't mention anything about ALL files being .php files, but I'll look again. In the meantime, on to the code!

Thanks again. Abyss is working great!
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group