note 105285 added to features.commandline.webserver
| From: | matthewkastor at gmail dot com | Date: | Sun, 07 Aug 2011 23:39:46 +0000 |
| Subject: | note 105285 added to features.commandline.webserver | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182302@lists.php.net to get a copy of this message | ||
PHP 5.4, brand new stuff. :D This is awesome. What I'm assuming is that I'll now be able
to write small applications that have a web based gui, without installing apache, iis, or another
server.
So, say I wanted to write a small tool for a friend. Let's also say that my friend is a point
and click kind of girl. Before, I had to get a portable server, install PHP on it, install my
scripts, zip everything up, email it, and then sort out various issues.
Now it looks like I'll be able to send her a zip file with just the PHP CLI and whatever
extensions it may need. I'll be able to configure a batch file or shell script to start the PHP
CLI, then have my PHP scripts start the webserver and use exec or a similar function to open the web
browser at the appropriate location.
This will be much easier to troubleshoot. I can check for an unused port with the batch file or
shell script, and pass the port number to the PHP script in a number of ways. The only thing to
worry about is making sure the PHP CLI and extensions are compiled for her machine architecture.
After that it's a simple matter of configuring the firewall (if necessary) and setting the
proper permissions to allow the CLI to start the server (again, if necessary).
This is good. If it works well enough and she's using a new browser I'll be able to use
HTML5, JavaScript, and PHP to build user interfaces for simple scripts. :D
What I like the most is that I'll be able to make something useful for my friend, and I
don't have to scare her by saying "install the server" or "now go to the command
prompt and..."
We could do this all before with sockets: yes but, it was more complicated.
PHP is Awesome. :D
----
Server IP: 69.147.83.197
Probable Submitter: 68.41.94.241
----
Manual Page -- http://www.php.net/manual/en/features.commandline.webserver.php
Edit -- https://master.php.net/note/edit/105285
Del: integrated -- https://master.php.net/note/delete/105285/integrated
Del: useless -- https://master.php.net/note/delete/105285/useless
Del: bad code -- https://master.php.net/note/delete/105285/bad+code
Del: spam -- https://master.php.net/note/delete/105285/spam
Del: non-english -- https://master.php.net/note/delete/105285/non-english
Del: in docs -- https://master.php.net/note/delete/105285/in+docs
Del: other reasons-- https://master.php.net/note/delete/105285
Reject -- https://master.php.net/note/reject/105285
Search -- https://master.php.net/manage/user-notes.php