CFFTP avec un CFMODULE

cs_genjikun Messages postés 14 Date d'inscription dimanche 2 mai 2004 Statut Membre Dernière intervention 5 mars 2008 - 31 juil. 2006 à 16:23
nickadele Messages postés 1251 Date d'inscription mercredi 7 août 2002 Statut Modérateur Dernière intervention 10 avril 2013 - 4 août 2006 à 11:47
Bonjour,

J'essaye de faire un CFFTP en passant par un CFMODULE !

Voici le code :

Fichier " test.cfm "
<CFMODULE TEMPLATE="Module.cfm" Login="testLogin" Password="testPw" Connexion="Connec" Server="test.server.fr">

<CFIF Retour>
    Connection OUVERTE
<CFELSE>
    Connection ECHOUE
</CFIF>

<CFFTP CONNECTION="Connec"
ACTION="listdir"
NAME="ListFiles"
DIRECTORY="testDir"
STOPONERROR="Yes">

Fichier " Module.cfm "
<CFPARAM NAME="Attributes.Login"                 DEFAULT="">
<CFPARAM NAME="Attributes.Password"           DEFAULT="">
<CFPARAM NAME="Attributes.Server"                DEFAULT="">
<CFPARAM NAME="Attributes.Connexion"          DEFAULT="">

<CFFTP ACTION="open"
USERNAME="#Attributes.Login#"
CONNECTION="#Attributes.Connexion#"
PASSWORD="#Attributes.Password#"
SERVER="#Attributes.Server#"
STOPONERROR="Yes">

<CFSET Caller.Retour = #CFFTP.SUCCEEDED#>

Voilà ce qu'il m'affiche :

Connection OUVERTE

"Error Diagnostic Information
Invalid connection specified

The CONNECTION attribute you specified, 'Connec', is invalid or does not exist. [....]"

Pouvez vous m'aider à résoudre ce problème?

Merci,

Bao

1 réponse

nickadele Messages postés 1251 Date d'inscription mercredi 7 août 2002 Statut Modérateur Dernière intervention 10 avril 2013
4 août 2006 à 11:47
Fichier " Module.cfm "
<CFPARAM NAME="Attributes.Login"                 DEFAULT="">
<CFPARAM NAME="Attributes.Password"           DEFAULT="">
<CFPARAM NAME="Attributes.Server"                DEFAULT="">

<CFFTP ACTION="open"
USERNAME="#Attributes.Login#"
CONNECTION="Connec"
PASSWORD="#Attributes.Password#"
SERVER="#Attributes.Server#"
STOPONERROR="Yes">

<CFSET Caller.Connec = #Connec#>

Nickadele
----------------------------------------------
non, ma belle ne s'appel pas Adèle
0
Rejoignez-nous