Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    117
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Cool Disabling All Htmlentities

    Hey codingforums,

    I would like to disable all html entities on add.php of my script. However I am not sure how I would do this. This is new to me. Here is the source of add.php:

    http://pastebin.com/zEiuS185

    I would like people to be able to post an html snippet, but show it in a text file. Like show the whole sole, but have it not convert to the actually source. Here is my site for an example.

    I would like to turn this:
    http://digi-script.netii.net/info.php?id=21

    into this:
    http://digi-script.netii.net/info.php?id=20

    just the pure hard code, no converting to html...

    may I please have some help with this?

  • #2
    Regular Coder
    Join Date
    Jan 2011
    Posts
    117
    Thanks
    27
    Thanked 0 Times in 0 Posts
    Can I have help with this?

  • #3
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,217
    Thanks
    12
    Thanked 338 Times in 334 Posts
    not sure if I understand it right.

    if you want the whole HTML page displayed as text, send a text header (header("Content-Type: text/plain");)

    if you only need a part of the HTML code displayed as such, run it through htmlentities().
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •