Salve,
dopo aver effettuato tutte le ricerche possibili non riesco a capire come mai non mi salva dei file txt.
innanzi tutto vorrei sapere se l'AS è giusto per capire se è un problema ASP o addirittura Server:
ActionScript----------------
nella scena presenti:
1 Testo di input(input)
2 Testo dinamico(var:txtMessage)
3 Pulsante
n (release) {writeTxt();newMail = "";}
Codice PHP:
System.useCodepage = true;
input.html = true;
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success:Boolean) {
if(success){
input.htmlText = myLV.var1;
} else {
input.htmlText = "Impossibile caricare la pagina";
}
}
myLV.load("/public/testi/1_1.txt");
// function salva txt sul server
writeTxt = function () {
trace(_global.var_txtName);
update = new LoadVars();
update.input = input.htmlText;
update.txtName = _global.var_txtName;
update.onLoad = function() {
// input = this.confirm;
if (this.confirm == "FILE AGGIORNATO CON SUCCESSO!") {
myLV.load("/public/testi/" + _global.var_txtName);
txtMessage = this.pageTxtName;
}
};
update.onHTTPStatus = function(httpStatus:Number) {
this.httpStatus = httpStatus;
if(httpStatus < 100) {
txtMessage = "flashError";
}
else if(httpStatus < 200) {
txtMessage = "informational";
}
else if(httpStatus < 300) {
txtMessage = "Pagina salvata con successo";
}
else if(httpStatus < 400) {
txtMessage = "redirection";
}
else if(httpStatus < 500) {
txtMessage = "clientError";
}
else if(httpStatus < 600) {
txtMessage = "Errore del server: Impossibile salvare la pagina";
}
}
update.sendAndLoad("/gestione/aspwrite.asp", update);
};
Fine ActionScript--------------------------
LATO SERVER
ASP SCRIPT (VBSCRITP)------------------
Codice PHP:
<%
strCorpo = Request.Form("input")
strNomeFile = Request.Form("txtName")
strPath = Server.Mappath("/public/testi/ & strNomeFile)
Set objFileSy = Server.CreateObject("Scripting.FileSystemObject")
Set objApriFile = objFileSy.OpenTextFile(strPath, 2)
objApriFile.Write(strCorpo)
objApriFile.close
Set objApriFile = Nothing
Set objFileSy = Nothing
Response.Write "pageTxtName=" & strPath & "&confirm=FILE AGGIORNATO CON SUCCESSO!"
%>
FINE LATO SERVER ASP SCRIPT------------
Questo è quanto, non riesco a capire come mai non salva i file
una mano please