Does not work

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tooheys@fullchannel.net

    #1

    Does not work

    This may be to simple for the level of material I've already seen here,
    but nothing ventured.

    I have two web page linked from


    They are supposed to do the same thing. These pages are Test10 and
    Test20 namely print out "Hello World"

    Test10 works (after a fashion)

    Test20 does not work. The code from this page is
    <html>
    <head>
    <title>RICS Test page 02 06/23/05</title>
    <script language="php" type="text/php">
    <!--
    //-->
    </script>
    </head>
    <body>Test Start &gt;&gt;&gt;&gt ;
    <script language="php">
    $myvar = "Hello World 06/23/05";
    echo $myvar;
    </script>
    &lt;&lt;&lt;&lt ;Test End
    </body>
    </html>
    I will be grateful if someone will tell me why this does not work

    In advance, thanks

    Frank
    tooheys@fullcha nnel.net

  • Jeroen

    #2
    Re: Does not work

    i'm totally not that much into php! :B but i think this is an easier way to
    encapsulate your php code:

    <?php
    $myvar = "Hello World 06/23/05";
    echo $myvar;
    ?>

    am i right guys?

    if it still doesn't work.. first thing i'd check is, if my php is installed
    right.

    Greets
    Jeroen

    <tooheys@fullch annel.net> wrote in message
    news:1120086203 .414032.273130@ f14g2000cwb.goo glegroups.com.. .[color=blue]
    > This may be to simple for the level of material I've already seen here,
    > but nothing ventured.
    >
    > I have two web page linked from
    > http://www.rhodeisland-aa.org/ricsmeetings/index.htm
    >
    > They are supposed to do the same thing. These pages are Test10 and
    > Test20 namely print out "Hello World"
    >
    > Test10 works (after a fashion)
    >
    > Test20 does not work. The code from this page is
    > <html>
    > <head>
    > <title>RICS Test page 02 06/23/05</title>
    > <script language="php" type="text/php">
    > <!--
    > //-->
    > </script>
    > </head>
    > <body>Test Start &gt;&gt;&gt;&gt ;
    > <script language="php">
    > $myvar = "Hello World 06/23/05";
    > echo $myvar;
    > </script>
    > &lt;&lt;&lt;&lt ;Test End
    > </body>
    > </html>
    > I will be grateful if someone will tell me why this does not work
    >
    > In advance, thanks
    >
    > Frank
    > tooheys@fullcha nnel.net
    >[/color]


    Comment

    • tooheys@fullchannel.net

      #3
      Re: Does not work

      I thought, I'd tried that variation earlier (it did not work either).
      The code shown in my original message is the way it is now -- after
      trying a lot of variations. There is now a third link on the index page
      with this variation -- I seemed to not work again.

      The point of Test10 is to demonstrate to me at least that php is
      actually working -- I just do not understand why Test10 works and all
      of the variations of Test20 do not.

      I do thank you for your input -- there is nothing like revisiting the
      issue to see what I missed.

      F.

      Comment

      • Peter Chant

        #4
        Re: Does not work

        tooheys@fullcha nnel.net wrote:
        [color=blue]
        > This may be to simple for the level of material I've already seen here,
        > but nothing ventured.
        >
        > I have two web page linked from
        > http://www.rhodeisland-aa.org/ricsmeetings/index.htm
        >
        > They are supposed to do the same thing. These pages are Test10 and
        > Test20 namely print out "Hello World"[/color]

        Is your server set up for php to parse files with a '.htm' extension? Try
        renaming them test10.php and test20.php to see if that works.

        I've no experience of using tags such as <script lang="php"> what the other
        poster suggested seems a reasonable thing to try.

        BTW I'm not a php guru so others may give a better answer.

        Pete

        --

        Comment

        • Daniel Tryba

          #5
          Re: Does not work

          tooheys@fullcha nnel.net wrote:[color=blue]
          > This may be to simple for the level of material I've already seen here,
          > but nothing ventured.
          >
          > I have two web page linked from
          > http://www.rhodeisland-aa.org/ricsmeetings/index.htm
          >
          > They are supposed to do the same thing. These pages are Test10 and
          > Test20 namely print out "Hello World"
          >
          > Test10 works (after a fashion)[/color]

          It does defintely _NOT_ work, use^Wview the source
          [color=blue]
          > Test20 does not work. The code from this page is[/color]

          PHP isn't called to parse your scripts, either have your webserver parse
          these .htm as php (see archive of list, it's been asked a couple of time
          the last few weeks). Or rename to files/url to something that is parsed
          by php (usually .php).

          Comment

          • tooheys@fullchannel.net

            #6
            Re: Does not work

            See my reply to the next message and thank you very much

            Comment

            • tooheys@fullchannel.net

              #7
              Re: Does not work

              I changed the extension of Text21 from htm to php. It now works. Thank
              you very much.

              I am curious why Text10.htm works but the others do not -- could you
              provide some insight into that.

              I'm a newbie but I know enough to learn from those that have gone
              before me.

              I do not understand "use^Wview the source ". Would you please take just
              a few more minutes to tell me what "use^Wview the source" means?

              Thanks in advance.

              Comment

              • Niklas Schönberg

                #8
                Re: Does not work

                tooheys@fullcha nnel.net wrote:[color=blue]
                > I changed the extension of Text21 from htm to php. It now works. Thank
                > you very much.
                >
                > I am curious why Text10.htm works but the others do not -- could you
                > provide some insight into that.[/color]

                As Daniel pointed out it does not work, non of the .htm ones does. It's
                just that you php script is actually somewhat parseable as html in the
                first example.
                [color=blue]
                > I'm a newbie but I know enough to learn from those that have gone
                > before me.
                >
                > I do not understand "use^Wview the source ". Would you please take just
                > a few more minutes to tell me what "use^Wview the source" means?[/color]

                Right click on the document when it's open and select "View Page Source"
                on firefox, should be something similar on other browsers. The Source
                you see at this point should not contain any php at all, since php
                should be run at the server before the page is sent to the browser.

                -----BEGIN PGP SIGNATURE-----
                Version: GnuPG v1.4.1 (GNU/Linux)
                Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

                iD8DBQFCw8ssZeV xmdI1of8RAg5EAJ 4tlE/fPfWvH3DBaAJ2Fa PUCWkvNwCgstp4
                dOxwFdigiRRCpyi +nnP36KU=
                =l/mb
                -----END PGP SIGNATURE-----

                Comment

                • tooheys@fullchannel.net

                  #9
                  Re: Does not work

                  Thanks I had noted that but did not understand the significance

                  This is a great group -- thanks all

                  Niklas Schönberg wrote:[color=blue]
                  > tooheys@fullcha nnel.net wrote:[color=green]
                  > > I changed the extension of Text21 from htm to php. It now works. Thank
                  > > you very much.
                  > >
                  > > I am curious why Text10.htm works but the others do not -- could you
                  > > provide some insight into that.[/color]
                  >
                  > As Daniel pointed out it does not work, non of the .htm ones does. It's
                  > just that you php script is actually somewhat parseable as html in the
                  > first example.
                  >[color=green]
                  > > I'm a newbie but I know enough to learn from those that have gone
                  > > before me.
                  > >
                  > > I do not understand "use^Wview the source ". Would you please take just
                  > > a few more minutes to tell me what "use^Wview the source" means?[/color]
                  >
                  > Right click on the document when it's open and select "View Page Source"
                  > on firefox, should be something similar on other browsers. The Source
                  > you see at this point should not contain any php at all, since php
                  > should be run at the server before the page is sent to the browser.[/color]

                  Comment

                  Working...