#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Hi,
    I have a script where I use some PHP in the beginning (between the <head> tags). But then I want to disable further parsing of the script, but still wite out the rest of the html-code.

    So, if I later write some php code, it'll be written out just as it is, not be parsed. exit() or die() doesn't work in this case.

    Can anybody please help me?
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    do you mean you want to display the PHP as text in the browser? - if so use

    <? echo htmlspecialchars(<? echo "this will be printed to screen etc";?> );?>

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    yes, I want to print the PHP code as text, but still get the html-code right.
    If I do as you said, the <> around the html-tags will becode > and stuff like that...

    So what i want is the PHP engine to stop looking for PHP scripts in the file...

    Any new ideas?

    /Joel
  6. #4
  7. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    Just do it with html
    and use the.. erm i guess code tag, or
    pre tag like:
    <pre>
    $bla=blei;
    $henk="name";
    function.. etc u get the point
    </pre>

    and leave the <?php out of that tag

    ------------------
    Greetings lewi
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Thanks, but no, that's not good enough...
    Since I don't know what's going to be in the body of the file, I can't use the <pre> tag.
    The rest of the document is taken out of a database, and I can't controll what people write in it...
    So, what I need is a command which stops the rest of the PHP execution in the document, but still returns all the HTML code...

    //Joel

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo