Lisbao 0 Denunciar post Postado Julho 6, 2006 O código inicial estava em PHP, daí eu usei o PHPConvert para ficar em asp.net, pq pensei que o servidor suportava, mas aí eu vi que não suporta asp.net e somente asp.... e daí deu nisso Eu tenho uma página em aspx e gostaria passar pra asp normal... atualizar_link.aspx <%@ Page language="c#" %><script runat="server" language="c#"> public string arquivo; public object pasta; public string msg; public System.IO.FileStream arq; public System.IO.FileStream arq1; public string pastas;</script><% if (PHP.TypeSupport.ToBoolean(new PHP.OrderedMap(Request.Form, false))) { arquivo = PHP.TypeSupport.ToString((Request.Files["arquivo"] != null)?Request.Files["arquivo"].FileName:""); pasta = Request.Form["pasta"]; msg = "<% response.redirect(\"http://www.ibcu.org.br/audio/" + PHP.TypeSupport.ToString(pasta) + "/" + arquivo + "\") %>"; if (!(System.IO.File.Exists("msg_atual.asp") || System.IO.Directory.Exists("msg_atual.asp"))) { //CONVERSION_WARNING: Method 'fopen' was converted to 'PHP.FileSystemSupport.FileOpen' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fopen.htm arq = PHP.FileSystemSupport.FileOpen("msg_atual.asp", "a+"); //CONVERSION_WARNING: Method 'fputs' was converted to 'PHPFileSystemSupport.Write' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fputs.htm PHP.FileSystemSupport.Write(arq, msg, msg.Length); //CONVERSION_WARNING: Method 'fclose' was converted to 'PHP.FileSystemSupport.Close' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fclose.htm PHP.FileSystemSupport.Close(arq); } else { //CONVERSION_WARNING: Method 'unlink' was converted to 'System.IO.File.Delete' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/unlink.htm System.IO.File.Delete("msg_atual.php"); //CONVERSION_WARNING: Method 'fopen' was converted to 'PHP.FileSystemSupport.FileOpen' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fopen.htm arq = PHP.FileSystemSupport.FileOpen("msg_atual.php", "a+"); //CONVERSION_WARNING: Method 'fputs' was converted to 'PHPFileSystemSupport.Write' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fputs.htm PHP.FileSystemSupport.Write(arq, msg, msg.Length); //CONVERSION_WARNING: Method 'fclose' was converted to 'PHP.FileSystemSupport.Close' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fclose.htm PHP.FileSystemSupport.Close(arq); } PHP.MiscSupport.End("Arquivo atualizado"); } %><html><head><title>Atualizar Arquivo</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form enctype="multipart/form-data" method="post" action="<%Response.Write(Request.Path);%>"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Última Mensagem do dia:</font> <input type = "file" name = "arquivo"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">na série:</font> <select name="pasta"> <% if (System.IO.File.Exists("select_pasta.txt") || System.IO.Directory.Exists("select_pasta.txt")) { //CONVERSION_WARNING: Method 'fopen' was converted to 'PHP.FileSystemSupport.FileOpen' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fopen.htm arq1 = PHP.FileSystemSupport.FileOpen("select_pasta.txt", "r+"); //CONVERSION_WARNING: Method 'feof' was converted to 'System.IO.FileStream.Position' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/feof.htm while (!(arq1.Position >= arq1.Length)) { //CONVERSION_WARNING: Method 'fgets' was converted to 'PHP.FileSystemSupport.ReadLine' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fgets.htm pastas = PHP.FileSystemSupport.ReadLine(arq1, 1024); Response.Write(pastas); } //CONVERSION_WARNING: Method 'fclose' was converted to 'PHP.FileSystemSupport.Close' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fclose.htm PHP.FileSystemSupport.Close(arq1); } %> </select> <input name = "Enviar" type = "submit" value = "Enviar Arquivo"></form><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href = "select_pasta.aspx">Atualizar Séries</a></font> </body></html> e select_pasta.aspx <%@ Page language="c#" %><script runat="server" language="c#"> public string msg; public System.IO.FileStream arq;</script><%Response.Write("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?" + ">");%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><% if (PHP.TypeSupport.ToBoolean(new PHP.OrderedMap(Request.Form, false))) { //CONVERSION_WARNING: Method 'isset' was converted to '!=' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/isset.htm if (Request.Form["nova_pasta"] != null) { msg = "<option value = \"" + PHP.TypeSupport.ToString(Request.Form["nova_pasta"]) + "\">" + PHP.TypeSupport.ToString(Request.Form["nova_pasta"]) + "</option>"; //CONVERSION_WARNING: Method 'fopen' was converted to 'PHP.FileSystemSupport.FileOpen' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fopen.htm arq = PHP.FileSystemSupport.FileOpen("select_pasta.txt", "a+"); //CONVERSION_WARNING: Method 'fputs' was converted to 'PHPFileSystemSupport.Write' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fputs.htm PHP.FileSystemSupport.Write(arq, msg + "\r\n", msg.Length + 4); //CONVERSION_WARNING: Method 'fclose' was converted to 'PHP.FileSystemSupport.Close' which has a different behavior. Copy this link in your browser for more info: ms-its:C:\phpconverter\PHPToAspNet.chm::/fclose.htm PHP.FileSystemSupport.Close(arq); } Response.Write("<a href =" + PHP.TypeSupport.ToString(Request.Path) + ">Atualizar Novamente</a>"); PHP.MiscSupport.End("<br>Arquivo atualizado"); } %><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Mandar Pasta</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><form action="<%Response.Write(Request.Path);%>" method="post"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Digite o nome da nova pasta criada: </font> <input name = "nova_pasta" type = "text" id = "nova_pasta" /> <input name = "" type = "submit" value = "Mandar Pasta" /></form></body></html> tem como converter essas páginas em páginas asp normal? obrigado.... Compartilhar este post Link para o post Compartilhar em outros sites
Chan10 0 Denunciar post Postado Julho 6, 2006 cara de boa ! nao acho que alguem aqui vai converter o codigo pra você ! vai dar muito trabalho ! mas se tiver alguem a fim de fazer fica mais facil você mandar o codigo php pro cara ver !!! é mais facil converter php pra asp do que asp.net pra asp hehhehe ao menos eu acho isso. isso falando na mao né !!! nao sei se existe uma ferramente que faça isso direto. bota o codigo php ai que deve ta mais limpo ai fica mais facil http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif Compartilhar este post Link para o post Compartilhar em outros sites
Lisbao 0 Denunciar post Postado Julho 6, 2006 cara de boa ! nao acho que alguem aqui vai converter o codigo pra você ! vai dar muito trabalho !mas se tiver alguem a fim de fazer fica mais facil você mandar o codigo php pro cara ver !!! é mais facil converter php pra asp do que asp.net pra asp hehhehe ao menos eu acho isso.isso falando na mao né !!! nao sei se existe uma ferramente que faça isso direto.bota o codigo php ai que deve ta mais limpo ai fica mais facil http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gifeu coloquei...tipo achei que fosse mais fácil de aspx para asp... mas.... beleza...a página em phpatualizar_link.php<?php if($_POST) { $arquivo = $_FILES["arquivo"]["name"]; $pasta = $_POST["pasta"]; $msg = '<?php header("Location:http://www.ibcu.org.br/audio/'.$pasta.'/'.$arquivo.'"); ?>'; if(!file_exists("msg_atual.php")) { $arq = fopen("msg_atual.php","a+"); fputs($arq,$msg,strlen($msg)); fclose($arq); } else { unlink("msg_atual.php"); $arq = fopen("msg_atual.php","a+"); fputs($arq,$msg,strlen($msg)); fclose($arq); } die("Arquivo atualizado"); } ?><html><head><title>Atualizar Arquivo</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Última Mensagem do dia:</font> <input type="file" name="arquivo"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">na série:</font> <select name="pasta"> <?php if(file_exists("select_pasta.txt")) { $arq1 = fopen("select_pasta.txt","r+"); while(!feof($arq1)) { $pastas = fgets($arq1,1024); echo $pastas; } fclose($arq1); } ?> </select> <input name="Enviar" type="submit" value="Enviar Arquivo"></form><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="select_pasta.php">Atualizar Séries</a></font> </body></html> Compartilhar este post Link para o post Compartilhar em outros sites