pozycjonowanie Dodawarka do katalogów katalogowanie
Już kilka miesięcy później projekt przekształcił się w zalążek znanego obecnie języka programowania, gdy został połączony z innym narzędziem Rasmusa Lerdorfa – Form Interpreter, które dało drugi człon nazwy. W 1997 roku pojawiło się PHP/FI 2.0, posiadające wtedy kilka tysięcy aktywnych użytkowników na całym świecie oraz obsługujące 50 tys. domen. Co ciekawe, wersja ta spędziła większość "życia" na beta testach. Oficjalne wydanie było tylko jedno i ukazało się w listopadzie 1997 roku.


artykuły ekologiczne dla dzieci
Bezpieczne zabawki dla najmłodszych
Ubranka z naturalnych materiałów
www.ekodzieci.pl
wholesale leather handbag
Bags include magnetic press stud closure
The Visconti messenger bag is perfect
www.viscontibags.co.uk
nieruchomości śląsk
Ogromna ilość mieszkań na sprzedaż
Domki jednorodzinne w dobrej lokalizacji
www.nieruchomosci-spektrum.pl
teflon
Tworzywa sztuczne odporne na ścieranie
Elementy konstrukcyjne z tworzyw
www.syltech.pl


Generator bannerów
Zrób sobie banner szybko i za darmo
Prosty sposób na tworzenie bannerów
www.reklama-internetowa.com/banner/
GPS
Navigation GSP, system mobile and phone
Soft from gps, soft phone gps
www.pl-gps.com


Elementy programowania obiektowego pojawiły się już w PHP 3 lecz nie pozwalały one rozwinąć skrzydeł programistom. Brakowało wielu istotnych elementów a kod nie był zoptymalizowany. Sytuacja całkowicie uległa zmianie w PHP 5 – dodano wiele istotnych rzeczy m.in. interfejsy, kontrolę dostępu czy klasy abstrakcyjne. Model OOP wzorowany jest na językach C++ i Java.

Rozdział 37. Dealing with XForms

XForms defines a variation on traditional webforms which allows them to be used on a wider variety of platforms and browsers or even non-traditional media such as PDF documents.

The first key difference in XForms is how the form is sent to the client. XForms for HTML Authors contains a detailed description of how to create XForms, for the purpose of this tutorial we'll only be looking at a simple example.

Przykład 37-1. A simple XForms search form

<h.php xmlns:h="http://www.w3.org/1999/.php"
        xmlns="http://www.w3.org/2002/xforms">
<h:head>
 <h:title>Search</h:title>
 <model>
  <submission action="http://example.com/search"
              method="post" id="s"/>
 </model>
</h:head>
<h:body>
 <h:p>
  <input ref="q"><label>Find</label></input>
  <submit submission="s"><label>Go</label></submit>
 </h:p>
</h:body>
</h.php>

The above form displays a text input box (named q), and a submit button. When the submit button is clicked, the form will be sent to the page referred to by action.

Here's where it starts to look different from your web application's point of view. In a normal HTML form, the data would be sent as application/x-www-form-urlencoded, in the XForms world however, this information is sent as XML formatted data.

If you're choosing to work with XForms then you probably want that data as XML, in that case, look in $HTTP_RAW_POST_DATA where you'll find the XML document generated by the browser which you can pass into your favorite XSLT engine or document parser.

If you're not interested in formatting and just want your data to be loaded into the traditional $_POST variable, you can instruct the client browser to send it as application/x-www-form-urlencoded by changing the method attribute to urlencoded-post.

Przykład 37-2. Using an XForm to populate $_POST

<h.php xmlns:h="http://www.w3.org/1999/.php"
        xmlns="http://www.w3.org/2002/xforms">
<h:head>
 <h:title>Search</h:title>
 <model>
  <submission action="http://example.com/search"
              method="urlencoded-post" id="s"/>
 </model>
</h:head>
<h:body>
 <h:p>
  <input ref="q"><label>Find</label></input>
  <submit submission="s"><label>Go</label></submit>
 </h:p>
</h:body>
</h.php>

Notatka: As of this writing, many browsers do not support XForms. Check your browser version if the above examples fails.