PHP in HTML?
Is there a way to insert PHP code into HTML page?
Supose not...with iframe? not good...
Is that meaning that I need to make **.php pages with .php script code included?
But I am using WYSWYG editors (FP i DW) ... is there one for php?
Lots of questions..heh...please answer...tnx.
Will be the best that there is a way to make HTML page with PHP script inside it (News or articles)...
m3rajk posted this at 20:15 — 30th June 2004.
They have: 461 posts
Joined: Jul 2003
you can do script type="php/something"> but to do that you need php as a module. most, if not all modern pph set ups goees the other way, it's done so the page is php and you have the html in the php
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
Busy posted this at 22:40 — 30th June 2004.
He has: 6,151 posts
Joined: May 2001
use the .htaccess file to set html to parse php files
AddType application/x-httpd-php .php .html .phtml
add what you want to the end of it, and whatever is listed will act as a .php page
The down side to this is it effects your whole site, and if you have forms on your site adding things to the url can have effect in your pages. say you have a email form, someone can come along and add heaps of email addresses via the url and spam the nation if you have no reffer checks or variable checks.
Remember safety first.
** look both ways before crossing the information highway **
kb posted this at 02:03 — 1st July 2004.
He has: 1,380 posts
Joined: Feb 2002
I think I understand what you're asking...
You want like a template system setup? where you have a .php file that has the contents of just say a table that changes per page, and the rest built in?
You can do something like this:
header.php
<?php
echo \"xml version=\\"1.0\\" encoding=\\"UTF-8\\"\n\";
// The rest of your php here
<html>
etc....
<body>
?>
footer.php
<?php
</body>
etc etc
?>
index.php
<?php
include('/header.php');
<table>
etc.
</table>
Php
include('/footer.php');
?>
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.