…
In Questo articolo vi mostreremo come visualizzare le informazioni di un prodotto all’hover di una miniatura.
Questo articolo potrebbe ritornarvi utile se desiderate vendere i vostri prodotti online.
In questo semplice tutorial vi mostreremo come “far vedere” a una funzione un array che si trova all’esterno.
//declarating array $array_string = array( [0] => "zero" [1] => "one" [2] => "two" [3] => "three" ); //declarating function function _e($number){ global $array_string; echo $array_string[$number]; } //using function _e(2); //echo "two" …
…
Nel tutorial di oggi vi mostreremo come modificare un PDF con PHP grazie alla libreria fpdf.
< ?php require_once('fpdf.php'); require_once('fpdi.php'); // initiate FPDI $pdf = new FPDI(); // add a page $pdf->AddPage(); // set the sourcefile $pdf->setSourceFile('ex.pdf'); // import page 1 $tplidx = $pdf->importPage(1); for ($i = 1; $i < = 6; $i++) { $tplidx = $pdf->ImportPage($i); $pdf->useTemplate($tplidx, 10, 10…
Nel tutorial di oggi vi mostreremo come creare una funzione che converte una URL assoluta in una relativa.
function rel2abs($rel, $base) { /* return if already absolute URL */ if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel; /* queries and anchors */ if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel; /* parse base URL and convert to local variables: $scheme, $host, $path */ extract(parse_url($base)); /* remove non-directory element from path */ $path = preg_replace('#/[^/]*$#'…
…