You are here: Re: JavaScript to PHP? « PHP Programming Language « IT news, forums, messages
Re: JavaScript to PHP?

Posted by Jerry Stuckle on 03/31/06 05:02

noone wrote:
> Thomas 'PointedEars' Lahn wrote:
>
>
>
>> PHP can also run without a server.
>
>
>
> 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.
>

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.

> 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 "application".
> 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.
>

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@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация