1 / 5

Bruk av PHP

Bruk av PHP. Nyttige funksjoner. Tidsfunksjoner Time(), date(), checkdate(), mktime() Tabellfunksjoner Navigasjon current(), key(), next(), prev(), end(), reset() Sortering Sort(), asort(), ksort(), rsort(), arsort(), krsort() Strengfunksjoner

boaz
Télécharger la présentation

Bruk av PHP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bruk av PHP

  2. Nyttige funksjoner • Tidsfunksjoner • Time(), date(), checkdate(), mktime() • Tabellfunksjoner • Navigasjon • current(), key(), next(), prev(), end(), reset() • Sortering • Sort(), asort(), ksort(), rsort(), arsort(), krsort() • Strengfunksjoner • substr(), str_replace(), strlen(), trim(), strstr()

  3. Kommunikasjon med nettleseren • Innebygde globale tabeller • _GET, _POST, _COOKIES, _REQUEST, _SERVER • Funksjoner for å sende tekst til nettleseren • echo, print(), printf(), flush() • Utbuffer • ob_start, ob_flush(), ob_end_flush(), ob_clean() • header(string header, boolean replace, integer response)

  4. Integrasjon med HTML • PHP tagger i HTML dokumentet • Formatere output • Behandling av skjema • Bruk av PHP til å skrive ut all HTML • Skille HTML og PHP

  5. Tilstandsbevaring • Lagring i URL • Lagring i hidden felter • Ved hjelp av cookies • setcookie funksjonen • Cookies lagres i tekstfiler – plassering og navn er spesifikk for nettleser • Ved hjelp av session • $_SESSION tabellen • start_session() • session_id()

More Related