correction à tester/valider : on peut passer les paramètres de l'url du PDF en string systématiquement
This commit is contained in:
parent
70ef56ad29
commit
4240e86452
1 changed files with 5 additions and 1 deletions
|
@ -4,19 +4,23 @@ if (!defined('_ECRIRE_INC_VERSION')){
|
|||
}
|
||||
|
||||
function inc_charger_pdf_dist($fichier_pdf, $contexte = []){
|
||||
var_dump($contexte);
|
||||
$login = lire_config('curl_login');
|
||||
$password = lire_config('curl_mdp');
|
||||
$url = $GLOBALS['meta']['adresse_site'].'/spip.php?page=spipdf&spipdf='.$fichier_pdf;
|
||||
if (is_array($contexte) and count($contexte)) {
|
||||
foreach ($contexte as $champ => $val) {
|
||||
if (intval($val)) {
|
||||
/* if (intval($val) === $val) {
|
||||
// if (intval($val)) {
|
||||
$val = intval($val);
|
||||
} else {
|
||||
$val = "$val";
|
||||
}
|
||||
*/
|
||||
$url .= "&$champ=$val";
|
||||
}
|
||||
}
|
||||
|
||||
$CurlConnect = curl_init();
|
||||
|
||||
// pour une connexion https locale avec certificat auto-signé
|
||||
|
|
Loading…
Add table
Reference in a new issue