Re: backslashes added to quotes when reading from form

From: paul (paul_at_not.net)
Date: 12/03/04


Date: Fri, 03 Dec 2004 13:46:22 -0800

Oh no they support php, it's just when I post the contents of a text
file containing some php code, it is not interpreted. This is the code I
extract it with:

         # extract comments from text file to screen
         if (file_exists ("$basename.txt")){
            $comment = file_get_contents("$basename.txt");
            print $comment;
         }

If the content is:

<?php print "hello"; ?>

it comes up blank, though I thought before it printed out that code
verbatim.

html code like test does get interpreted as html though.

Harrie Verveer wrote:

> if you used <? as open tag, try using <?php
>
> if that doesn't work, I'm afraid your hosting provider doesn't support
> PHP :(
>
> paul wrote:
>
>> Interestingly, I tried putting some php code in my form and it didn't
>> execute. The html code gets properly formatted but the php just comes
>> out as raw text.



Relevant Pages

  • PHP Optimization question
    ... I'm trying to optimize a php project of mine and I'm running into some ... total mysql query time is about .1 to .12 ... For some reason the part of my php that takes the longest to execute ... is a rather large section of html code with some <? ...
    (comp.lang.php)
  • Re: [PHP] Why PHP4?
    ... Maybe I'm in a "GET LOST PHP" phase but I think that someone is killing it, ... converted their CGI or other websites in to PHP 4 websites because it was ... dealt until php 4.3.1 as a security concept. ... still support PHP 4. ...
    (php.general)
  • Re: How to Add a Feeback Form
    ... Let's say I do contact my web host and determine that it doesn't support PHP ... Greg Maxey/Word MVP ...
    (microsoft.public.frontpage.programming)
  • Re: [PHP] Microsoft Partners With Zend
    ... [PHP] Microsoft Partners With Zend ... I wonder if .NET will ever support PHP *GRIN* ...
    (php.general)
  • Re: Proof of concept questions
    ... Currently I have a web hosting service and it does ... > support php. ... Yes, it can be done in PHP, however, it can't really be done with web servers. ...
    (comp.lang.php)