|
cloetfred
| Inscrit le: 30 Mar 2005 |
| Messages: 26 |
|
|
 |
| Posté le: Jeu 16 Mar 2006, 5:51 pm |
|
 |
 |
 |
 |
Bonjour,
Je récupère la maintenance d'un code qui fait appel à un fonction définie dans un dll. Je n'ai jamais utilisé ce type de fonctionnalité. Je n'arrive pas à charger la dll ou la fonction dans la dll
Voici le morceau de code . $en étant le chemin de la dll.
if(!function_exists("har_decode"))
{
@dl($en);
echo "fonction n'existe pas <br>";
}
else
{
echo "fonction existe";
}
if(!function_exists("har_decode")) exit("Unable to load required library $en."); |
Pourquoi cela ne marche t il pas ? Faut il que je déclare quelque chose ? ou ?
Merci de votre aide
|
|
|
|
cloetfred
| Inscrit le: 30 Mar 2005 |
| Messages: 26 |
|
|
 |
| Posté le: Jeu 16 Mar 2006, 9:30 pm |
|
 |
 |
 |
 |
re bonjour,
voici mon code complet. Il s'agit d'une page permettant d'accéder à l'interface d'administration du site:
<?php
if(!function_exists("har_decode"))
{
$w=(substr(PHP_OS,0,3)=="WIN")?1:0;
$ln="php_ugdec";
if($w)
{
$ln=$ln.".dll";
$cd=getcwd();
if($cd[1]==":") $cd=substr($cd,2);
}
else
{
$ln=$ln.".so";
$cd=dirname(getenv("PATH_TRANSLATED"));
if(strlen($cd)<3) $cd=dirname($_SERVER["PATH_TRANSLATED"]);
if(strlen($cd)<3) $cd=getcwd();
}
if($cd[strlen($cd)-1]!="/")$cd=$cd."/";
$en=str_repeat("../",substr_count($cd,"\\")+substr_count($cd,"/"))."..".$cd.$ln;
//if(!function_exists("har_decode")) @dl(basename($en));
if(!function_exists("har_decode")) dl(basename($ln));
//if(!(file_exists($en)) && !function_exists("har_decode")) exit("Required library $en not found.");
if(!(file_exists($ln)) && !function_exists("har_decode")) exit("Required library $ln not found.");
if(!function_exists("har_decode"))
{
//@dl($en);
dl($ln);
echo "fonction n'existe pas <br>";
}
else
{
echo "fonction existe";
}
if(!function_exists("har_decode")) exit("Unable to load required library $ln.");
}
$encdata="60RWHzbs/==";
har_decode($encdata);
?> |
|
|
|