Professional Web Applications Themes

Stuff inside <? ... ?> not being interpreted - PHP Development

Hi all. I have some scripts that switch between plain HTML and PHP. eg: <img src="<? echo($myimage) ; ?>" alt="myimage.jpg"> On my old system, the bit inside the <? ... ?> tags were interpreted properly, but now they're just being echoed like the rest of the html. It only seems to happen when I switch between html and php - I have other pages which are pure php ( also identified by <? ... ?> ) and they work fine, so it's *NOT* the short version of the php identifier or whatever. I also tried putting the 'php' bit in, ...

  1. #1

    Default Stuff inside <? ... ?> not being interpreted

    Hi all.

    I have some scripts that switch between plain HTML and PHP. eg:

    <img src="<? echo($myimage) ; ?>" alt="myimage.jpg">

    On my old system, the bit inside the <? ... ?> tags were interpreted
    properly, but now they're just being echoed like the rest of the html.

    It only seems to happen when I switch between html and php - I have
    other pages which are pure php ( also identified by <? ... ?> ) and they
    work fine, so it's *NOT* the short version of the php identifier or
    whatever. I also tried putting the 'php' bit in, eg:

    <img src="<?php echo($myimage) ; php?>" alt="myimage.jpg>

    Does the same thing - just gets printed and not interpreted.

    What's going on?

    Thanks in advance!

    Dan

    SpamBait Guest

  2. #2

    Default Re: Stuff inside <? ... ?> not being interpreted

    try :<img src="<? $myimage ?>" alt="myimage.jpg">
    ?
    or
    <img src=<? echo(\"$myimage\") ; ?> alt="myimage.jpg">


    --
    Salutations,

    Fred !
    ICQ: 46063572
    "SpamBait" <abusefederal.gov.au> a écrit dans le message de news:
    3f605a64$1duster.adelaide.on.net...
    > Hi all.
    >
    > I have some scripts that switch between plain HTML and PHP. eg:
    >
    > <img src="<? echo($myimage) ; ?>" alt="myimage.jpg">
    >
    > On my old system, the bit inside the <? ... ?> tags were interpreted
    > properly, but now they're just being echoed like the rest of the html.
    >
    > It only seems to happen when I switch between html and php - I have
    > other pages which are pure php ( also identified by <? ... ?> ) and they
    > work fine, so it's *NOT* the short version of the php identifier or
    > whatever. I also tried putting the 'php' bit in, eg:
    >
    > <img src="<?php echo($myimage) ; php?>" alt="myimage.jpg>
    >
    > Does the same thing - just gets printed and not interpreted.
    >
    > What's going on?
    >
    > Thanks in advance!
    >
    > Dan
    >

    Fritzoune Guest

  3. Moderated Post

    Default Re: Stuff inside <? ... ?> not being interpreted

    Removed by Administrator
    Tom Thackrey Guest
    Moderated Post

  4. Moderated Post

    Default Re: Stuff inside <? ... ?> not being interpreted

    Removed by Administrator
    SpamBait Guest
    Moderated Post

  5. Moderated Post

    Default Re: Stuff inside <? ... ?> not being interpreted

    Removed by Administrator
    vKp Guest
    Moderated Post

  6. #6

    Default Re: Stuff inside <? ... ?> not being interpreted

    No this is not a correct php syntax Fritzoune

    "Fritzoune" <webmasterdiscopac.ch> wrote in message
    news:3f60704f$0$3671$5402220fnews.sunrise.ch...
    > try :<img src="<? $myimage ?>" alt="myimage.jpg">
    > ?
    > or
    > <img src=<? echo(\"$myimage\") ; ?> alt="myimage.jpg">
    >
    >
    > --
    > Salutations,
    >
    > Fred !
    > ICQ: 46063572
    > "SpamBait" <abusefederal.gov.au> a écrit dans le message de news:
    > 3f605a64$1duster.adelaide.on.net...

    Savut Guest

  7. #7

    Default Re: Stuff inside <? ... ?> not being interpreted

    <img src="<?php echo($myimage) ; php?>" alt="myimage.jpg> is not a good
    syntax

    <img src="<?php echo($myimage) ;?>" alt="myimage.jpg> is the correct one

    "SpamBait" <abusefederal.gov.au> wrote in message
    news:3f605a64$1duster.adelaide.on.net...
    > Hi all.
    >
    > I have some scripts that switch between plain HTML and PHP. eg:
    >
    > <img src="<? echo($myimage) ; ?>" alt="myimage.jpg">
    >
    > On my old system, the bit inside the <? ... ?> tags were interpreted
    > properly, but now they're just being echoed like the rest of the html.
    >
    > It only seems to happen when I switch between html and php - I have
    > other pages which are pure php ( also identified by <? ... ?> ) and they
    > work fine, so it's *NOT* the short version of the php identifier or
    > whatever. I also tried putting the 'php' bit in, eg:
    >
    > <img src="<?php echo($myimage) ; php?>" alt="myimage.jpg>
    >
    > Does the same thing - just gets printed and not interpreted.
    >
    > What's going on?
    >
    > Thanks in advance!
    >
    > Dan
    >

    Savut Guest

Similar Threads

  1. ASP Code not interpreted
    By George Kentman in forum ASP Database
    Replies: 6
    Last Post: July 22nd, 03:09 PM
  2. Datagrid stuff inside
    By Jonathan Dixon in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: July 2nd, 03:51 PM
  3. Power of Interpreted Languages
    By T. Onoma in forum Ruby
    Replies: 13
    Last Post: November 17th, 10:36 PM
  4. [PHP] PHP - Interpreted or Compiled Language
    By Binay Agarwal in forum PHP Development
    Replies: 3
    Last Post: August 14th, 03:33 PM
  5. [PHP] PHP - Interpreted or Compiled Language
    By Jackson Miller in forum PHP Development
    Replies: 0
    Last Post: August 14th, 01:45 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139