ADS - GoldenWeb.it Directory "Premium" Links

Ritiro auto incidentate
Compriamo auto incidentate fuse. Azienda Italiana compra auto usate incidentate, auto sinistrate o fuse, macchine con problemi di meccanica, le spese sono a carico dell'acquirente ritiro e passaggio. visita il nostro sito internet per avere una proposta d'acquisto senza impegno
Ristorante Grottaferrata
Il Triclinium offre la possibilità di degustare pietanze e ricette dell'ottima cucina romana, di cui realizza anche rivisitazioni ed arricchimenti. L'ambiente è caratterizzato da disegni e colori che riconducono al fasto dei banchetti romani, e si presenta confortevole, caldo ed accogliente. L'ospitalità e la qualità delle materie prime, la possibilità di ospitare intolleranti e celiaci, nonchè gli amanti della pizza cotta al forno, fanno del locale un punto di riferimento per liete serate.
Scaricatore di condensa automatico aria compressa
Trappole e scaricatori di condensa che in modo automatico lavorano sui compressori o sui sistemi che genera aria compressa.
Hotel Ischia - Scegli Ischiaprenota.com
Cerchi un hotel Ischia? Su Ischiaprenota.com tantissime offerte hotel e lastminute Ischia a prezzi imbattibili. Hotel 3,4 e 5 stelle a partire da 20 a notte. Trattamento All-Inclusive, Pensione completa, Mezza Pensione e solo pernottamento. Nessun anticipo, paghi direttamente in hotel. Assistenza con personale Ischitano.

Submit Your Link...

PHP manual


Built-in web server

As of PHP 5.4.0, the CLI SAPI provides a built-in web server.

This web server is designed for developmental purposes only, and should not be used in production.

URI requests are served from the current working directory where PHP was started, unless the -t option is used to specify an explicit document root.

If a URI request does not specify a file, then either index.php or index.html in the given directory are returned. If neither file exists, then a 404 response code is returned.

If a PHP file is given on the command line when the web server is started it is treated as a "router" script for the web server. The script is run at the start of each HTTP request. If this script returns FALSE, then the requested resource is returned as-is. Otherwise the script's output is returned to the browser.

Example #1 Starting the web server

$ cd ~/public_html
$ php -S localhost:8000

The terminal will show:

PHP 5.4.0 Development Server started at Thu Jul 21 10:43:28 2011
Listening on localhost:8000
Document root is /home/me/public_html
Press Ctrl-C to quit

After URI requests for http://localhost:8000/ and http://localhost:8000/myscript.html the terminal will show something similar to:

PHP 5.4.0 Development Server started at Thu Jul 21 10:43:28 2011
Listening on localhost:8000
Document root is /home/me/public_html
Press Ctrl-C to quit.
[Thu Jul 21 10:48:48 2011] ::1:39144 GET /favicon.ico - Request read
[Thu Jul 21 10:48:50 2011] ::1:39146 GET / - Request read
[Thu Jul 21 10:48:50 2011] ::1:39147 GET /favicon.ico - Request read
[Thu Jul 21 10:48:52 2011] ::1:39148 GET /myscript.html - Request read
[Thu Jul 21 10:48:52 2011] ::1:39149 GET /favicon.ico - Request read

Example #2 Starting with a specific document root directory

$ cd ~/public_html
$ php -S localhost:8000 -t foo/

The terminal will show:

PHP 5.4.0 Development Server started at Thu Jul 21 10:50:26 2011
Listening on localhost:8000
Document root is /home/me/public_html/foo
Press Ctrl-C to quit

Example #3 Using a Router Script

Requests for images will display them, but requests for HTML files will display "Welcome to PHP"

<?php
// router.php
if (preg_match('/.(?:png|jpg|jpeg|gif)$/'$_SERVER["REQUEST_URI"]))
    return 
false;    // serve the requested resource as-is.
else { 
    echo 
"<p>Welcome to PHP</p>";
}
?>
$ php -S localhost:8000 router.php

After several URI requests the terminal will show something similar to:

PHP 5.4.0 Development Server started at Thu Jul 21 10:53:19 2011
Listening on localhost:8000
Document root is /home/me/public_html
Press Ctrl-C to quit.
[Thu Jul 21 10:53:45 2011] ::1:55801 GET /mylogo.jpg - Request read
[Thu Jul 21 10:53:52 2011] ::1:55803 GET /abc.html - Request read
[Thu Jul 21 10:53:52 2011] ::1:55804 GET /favicon.ico - Request read