Re: [PHP] Display HTML/PHP code on a web page

This is a discussion on Re: [PHP] Display HTML/PHP code on a web page within the PHP General forums, part of the PHP Programming Forums category; Jason Paschal <j_paschal@hotmail.com> wrote: > I've googled for it, but nothing came up. How do ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] Display HTML/PHP code on a web page

Jason Paschal <j_paschal@hotmail.com> 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 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 can get it to display with
> urlencode, but, of course, it's encoded.


htmlentities();

> Thank you,


Your welcome.

> Jason
>
> P.S. a bit more info:


Uh, oh.. I thought I had it under control :)

> I'm pulling a file from my site like this: $file =
> file("http://..../file.php");
> it works fine, but i want to be able to print out lines that meet a certain
> criteria, and that includes any of the html source that comes along with it.
> however, the the search script tries to execute the lines instead of
> displaying them.


hm.. so your trying to fetch the file from a web server but don't want
it to execute that file.php? See answer to first questoin.

> i don't want to write this to a file and then display as this is for admin
> purposes and i want to be able to do quick scans from a browser, and i want
> the matches to display underneath the search form, which I can do, but I
> make a note of it because the page still has to react as an html page (form
> submission).
> this make any sense?


You lost me here.


Curt
--
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:55 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0