Installazione e configurazione server apache e php
Se la passione di sviluppare pagine web e forte o si dispone di un proprio sito in rete e se ne vorrebbe testare off line le pagine appena create (prima di pubblicarle )be la soluzione è solo una installarsi un server sul proprio computer con magari anche l’ interprete Php in modo da poter così iniziare a capirci qualcosa di più su questo linguaggio che sempre più stà diventando uno standard per l’esecuzione di pagine dinamiche.L’ operazione non è da esperti e non richiede che pochi passaggi.
Continua a leggere …
Link: http://www.freether.com/Apache-Php.php
Una lista di password di default
Sul sito http://www.phenoelit.de/dpl/dpl.html è presente una infinita lista di password per tantissimi prodotti in commercio.
Funzione php che converte il tempo in formato tempo di orologio
function time2strclock($time)
{
$time = floor($time);
if (!$time)
return "00:00:00";
$str["hour"] = $str["min"] = $str["sec"] = "00";
$h = $time/3600;
$h = floor($h);
if ($h){
if ($h < 10)
$h = "0" . $h;
$str["hour"] = "$h";
$time = $time % 3600;
}
$m = $time/60;
$m = floor($m);
if ($m){
if ($m < 10)
$m = "0" . $m;
$str["min"] = "$m";
$time = $time % 60;
}
if ($time){
if ($time < 10)
$time = "0" . $time;
}
else
$time = "00";
$str["sec"] = "$time";
$ret = "$str[hour]:$str[min]:$str[sec]";
return $ret;
}
Funzione che converte bytes in stringa in php
function bytes2str($bytes)
{
$bytes=floor($bytes);
if ($bytes > 536870912)
$str = sprintf("%5.2f GBs", $bytes/1073741824);
else if ($bytes > 524288)
$str = sprintf("%5.2f MBs", $bytes/1048576);
else
$str = sprintf("%5.2f KBs", $bytes/1024);
return $str;
}
Eventi javascript usati con ajax
- onabort Occurs when the user aborts an action
- onblur Occurs when an element loses the input focus
- onchange Occurs when data in a control, such as a text field,changes
- onclick Occurs when the user clicks an element
- ondblclick Occurs when the user double-clicks an element
- ondragdrop Occurs when the user drags and drops an element
- onerror Occurs when there’s been a JavaScript error
- onfocus Occurs when an element gets the focus
- onkeydown Occurs when the user presses down on a key
- onkeypress Occurs when the user presses a key
- onkeyup Occurs when the user releases a key
- onload Occurs when the page loads
- onmousedown Occurs when the user presses down a mouse button
- onmousemove Occurs when the user moves the mouse
- onmouseout Occurs when the user moves the cursor away from an element
- onmouseover Occurs when the user moves the cursor over an element
- onmouseup Occurs when the user releases a mouse button
- onreset Occurs when the user clicks a Reset button
- onresize Occurs when the user resizes an element or page
- onsubmit Occurs when the user clicks a Submit button
- onunload Occurs when the browser unloads a page and moves to another page
Le proprieta dell’oggetto XMLHttpRequest
• onreadystatechange
– Event handler that fires at each state change
– You implement your own function that handles this
• readyState – sato corrente della richiesta
– 0 = uninitialized
– 1 = loading
– 2 = loaded
– 3 = interactive (some data has been returned)
– 4 = complete
• status
– HTTP Status ritornato dal server: 200 = OK
• responseText
– String version dei dati ritornati dal server
• responseXML
– XML DOM document dei dati ritornati
• statusText
– Testo dello status ritornato dal server

























