JavaScript to PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randy Webb

    #16
    Re: JavaScript to PHP?

    Thomas 'PointedEars' Lahn said the following on 3/30/2006 12:35 PM:[color=blue]
    > Tim Slattery wrote:
    >[color=green]
    >> "The Numerator" <alvin4jesus@gm ail.com> wrote:[color=darkred]
    >>> I was just wondering that if it is possible to do almost anything you
    >>> can do in JavaScript in PHP.[/color]
    >> Javascript is (nearly always, anyway) run on the client.[/color]
    >
    > JavaScript, JScript, and other ECMAScript implementations are.
    > There is no "Javascript ".[/color]

    You really are as anal as you act sometimes.
    [color=blue][color=green]
    >> PHP is run on the server. That being the case, they do quite different
    >> things.[/color]
    >
    > PHP can also run without a server.[/color]

    Yeah, but it's worthless when you do.
    [color=blue]
    > A signature part is to be delimited by "-- ".[/color]

    Obviously then, that wasn't a signature so it shouldn't be delimited by
    anything.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

    Comment

    • Jerry Stuckle

      #17
      Re: JavaScript to PHP?

      noone wrote:[color=blue]
      > Thomas 'PointedEars' Lahn wrote:
      >
      >
      >[color=green]
      >> PHP can also run without a server.[/color]
      >
      >
      >
      > That would be false. you cannot - start a browser
      > connect to a remote http(s) service
      > which responds with content
      > then have that content interact and execute a local PHP script.
      >[/color]

      No, but PHP can run without a server. It runs just fine without Apache or IIS
      as a batch job.

      He didn't say you could start a browser with it, but you can connect to a remote
      http(s) service and have it respond. The local script can then interact with
      the retrieved data.
      [color=blue]
      > If PHP is interactively (or via a cron job etc...) running, the box on
      > which it is running would be considered a server for that "applicatio n".
      > I think you are confusing client-server paradigm vs. a server paradigm.
      > PHP or even the remote server itself does not/cannot know that PHP is
      > even running on our "client". And even if it could, that would be a
      > HUGE security risk - which is why it cannot be done.
      > PHP is a scripting language. It does work and sends a response to
      > stdout. Where, in the context of a web server, stdout is the connection
      > to a remote browser. In the context of a terminal session (or CMD prompt
      > et. al.) stdout can be redirected to an output file or to the "terminal
      > session". Typing the command "php file.php" (or whatever) means that
      > you are executing it on this box. It does not interact with PHP on a
      > remote box - therefore it is server only.
      >[/color]

      No, at that point PHP is running as an application. Period. If what you say
      were true, a machine running *any* application would be a server. A C++ program
      could do exactly the same thing the PHP program is doing, for instance. Is the
      machine now a "server"? What if you're running a word processor (another
      application)?

      And no, it doesn't interact with PHP on a remote box. But it can interact with
      a web server or similar, just like a browser can. And that doesn't make the
      machine it's running on a server.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Jerry Stuckle

        #18
        Re: JavaScript to PHP?

        Randy Webb wrote:[color=blue][color=green]
        >>
        >>
        >> PHP can also run without a server.[/color]
        >
        >
        > Yeah, but it's worthless when you do.
        >[/color]

        Not at all. I have a number of PHP scripts which do thing that don't require a
        server. It works quite well as an application, also.


        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • Ian Collins

          #19
          Re: JavaScript to PHP?

          Randy Webb wrote:[color=blue][color=green]
          >>
          >> PHP can also run without a server.[/color]
          >
          >
          > Yeah, but it's worthless when you do.
          >[/color]
          PHP is a scripting language, you can use it for whatever you like.
          Running with a web sever is just one use.

          --
          Ian Collins.

          Comment

          • Tim Streater

            #20
            Re: JavaScript to PHP?

            In article <K9CdnStrneDExL HZnZ2dnUVZ_t6dn Z2d@comcast.com >,
            Randy Webb <HikksNotAtHome @aol.com> wrote:
            [color=blue]
            > Thomas 'PointedEars' Lahn said the following on 3/30/2006 12:35 PM:[color=green]
            > > Tim Slattery wrote:
            > >[color=darkred]
            > >> "The Numerator" <alvin4jesus@gm ail.com> wrote:
            > >>> I was just wondering that if it is possible to do almost anything you
            > >>> can do in JavaScript in PHP.
            > >> Javascript is (nearly always, anyway) run on the client.[/color]
            > >
            > > JavaScript, JScript, and other ECMAScript implementations are.
            > > There is no "Javascript ".[/color]
            >
            > You really are as anal as you act sometimes.
            >[color=green][color=darkred]
            > >> PHP is run on the server. That being the case, they do quite different
            > >> things.[/color]
            > >
            > > PHP can also run without a server.[/color]
            >
            > Yeah, but it's worthless when you do.[/color]

            No, PHP from the command line is a very handy scripting langauge.

            -- tim

            Comment

            Working...