Problem with PHP using WAMP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SIRIkusuma
    New Member
    • Sep 2008
    • 1

    Problem with PHP using WAMP

    Hi,
    I have a problem using php installed using wamp.
    Code:

    [code=php]
    <?php
    echo"Hello!";
    ?>
    [/code]

    The o/p is displayed as in the browser(Mozilla and MSIE)
    {\rtf1\ansi\ans icpg1252\deff0\ deflang1033{\fo nttbl{\f0\fswis s\fcharset0 Arial;}} {\*\generator Msftedit 5.41.21.2508;}\ viewkind4\uc1\p ard\f0\fs20 \par \par \par } �

    Can anyone please help me
    Last edited by Markus; Sep 29 '08, 08:58 PM. Reason: added [code] tags
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Wow, that is strange. Are you *sure* that's all you have in the file?
    Hm, I'm stumped.. never seen anything like that before.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi.

      What program did you use to create this file?
      Could it be that it is saving the file as some proprietary text format (like .doc) rather than plain-text?

      Comment

      • HappyKarry
        New Member
        • Mar 2012
        • 1

        #4
        Originally posted by SIRIkusuma
        Hi,
        I have a problem using php installed using wamp.
        Code:

        (snip)

        The o/p is displayed as in the browser(Mozilla and MSIE)
        {\rtf1\ansi\ans icpg1252\deff0\ deflang1033{\fo nttbl{\f0\fswis s\fcharset0 Arial;}} {\*\generator Msftedit 5.41.21.2508;}\ viewkind4\uc1\p ard\f0\fs20 \par \par \par } �

        Can anyone please help me

        Yes. Simple problem. Your input file is corrupt or is an unknown format. For example, you have created an RTF or DOC file and saved it as text. It looks like text, but has strange characters in it.

        To resolve:
        1. Open Notepad or Vi
        2. Put in your code, eg:
        Code:
        <?PHP phpinfo(); ?>
        3. Save the file eg phpinfo.php
        4. Load the page in your browser (eg: http://localhost/phpinfo.php )

        The reason you can't see this is that your text editor is nicely handling the viewing of your file.

        Comment

        Working...