11Fermer13
RHJPPLe 17/08/2007 à 20:24
Ximoon (./11) :
La fonction source permet de poster des sources gni
Ouais, mais le problème, c'est que c'est pas beau (il y a plein de bogues) et en plus, le code que l'on peut lire n'est pas celui posté... Ce n'est pas utilisable.
y> </html>Exemple : <?="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">      <head>           <title>Un site simple</title> <? function prettyprint($equ) {      if (!extension_loaded("curl"))           dl("curl");      $ch = curl_init();      curl_setopt($ch, CURLOPT_URL, "http://prettyprint.free.fr/index.php");      curl_setopt($ch, CURLOPT_HEADER, false);      curl_setopt($ch, CURLOPT_POST, true);      curl_setopt($ch, CURLOPT_POSTFIELDS, "equ=".urlencode($equ));      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);      curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);      $url = curl_exec($ch);      curl_close($ch);      // pour voir      $url = strtr($url, "<>'\"", "    ");      if (ereg(".*/[^\.]*\.([0-9]*)\..*", $url, $regs))           $v_align = " style=\"vertical-align:-${regs[1]}px\" ";      else $v_align = "";      return "<img src=\"$url\"${v_align} alt=\"".htmlentities($equ)."\"/>"; } ?>      <!-- un<? echo " "; ?>commentaire -->      </head>      <body>           <p>                Avec seulement une superbe équation : <?=prettyprint("exp(&imath;*&pi;)+1=0")?>.           </p>      </bod