Reply to Re: JavaScript to PHP?

Your name:

Reply:


Posted by noone on 03/31/06 01:16

Thomas 'PointedEars' Lahn wrote:

> Tim Slattery wrote:

>> "The Numerator" <alvin4jesus@gmail.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.

> JavaScript, JScript, and other ECMAScript implementations are.
> There is no "Javascript".

>> PHP is run on the server. That being the case, they do quite different
>> things.

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


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.


>> There is a small set of things that can be accomplished from either
>> end. There are *many* things that can be done client-side but not
>> server-side, and there are *many* things that can be done server-side
>> but not client-side.

> True.

[Back to original 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

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