[snip]
i'm not sure but i think a tag in html is available which name
and
[/snip]
You can also put your code between tags (pre-formatted text)
I do this to display pre formatted text in text area boxes
title); // article title
?>
By: name); //article author ?>
Published: publish); //art
; Sent: Thursday, July 17, 2003 9:29 AM
> Subject: [PHP] Display HTML/PHP code on a web page
>
>
> > I've googled for it, but nothing came up. How do I display code on a
page
> > without it being executed?
> > i want the page to display HTML code as it would look if you ty
> I've googled for it, but nothing came up. How do I display code on a page
> without it being executed?
If you want to show php source then you can use show_source function or
highlight_file function.
--
BigDog
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Jason Paschal <[EMAIL PROTECTED]> wrote:
> I've googled for it, but nothing came up. How do I display code on a page
> without it being executed?
This has to do with how your webserver is set up, because it see's that
its a php file it runs it thruough php.
> i want the page to display HTML cod
Don't really understand the problem but htmlspecialchars() will convert:
Justin & Co
into
Justin & Co
... which will solve half your problem... not sure what to do with php
code... perhaps the same thing...
Or, you may want to look at show_source() and highlight_file() as
well...
Jus
--- Jason Paschal <[EMAIL PROTECTED]> wrote:
> I've googled for it, but nothing came up. How do I display code
> on a page without it being executed?
Try htmlentities()
Chris
=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--
PHP General Mailing
I've googled for it, but nothing came up. How do I display code on a page
without it being executed?
i want the page to display HTML code as it would look if you typed it into
an editor (not encoded), and the code I want to display is being spit out by
PHP. Which functions should i look at? i
7 matches
Mail list logo