Ted k’ É assim que tem que ser! Programando em ASP, ASP.NET, PHP, CSS, dentre outras…


3
Mar/08
2


Instalando o IIS

Instalando o IIS não é tão dificil, você precisa dele fundamentalmente para rodar suas aplicações ASP ou ASP.NET (que não vem ao caso), lembrando que o IIS não vem configurando inicialmente...

Algumas imagens foram baixadas da internet para facilitar o entendimento, então vamos lá!!

Pegue o CD da sua versão do Windows XP, ou SP1 ou SP2, mais tem que ser a versão que está instalada no seu PC...

Quando colocar o CD do Windows, aparecerá a tela inicial de instalação, onde será escolhida a opção Instalar Componentes Opcionais do Windows.

Logo apois aparecerá uma lista de vários Componentes do Windows, procure o Internet Information Services (IIS) e marque ele.

Aparecerá uma página de auto instalação e logo após a tela de finalização avisando que o Assistente foi concluído!

Pronto o IIS já foi instalado no seu computador, mais para garanti vá em C:\Inetpub\wwwroot, verifique se existe a pasta Inetpub e dentro dela a wwwroot, caso tenha ótimo, agora é só ir no seu Navegador padrão e digitar http://localhost.

Caso apareça duas páginas referentes ao IIS está tudo funcionando como deveria ser!!!

Dica: Acesse também http://www.webly.com.br

2
Mar/08
0


Ver componentes instalados

  1.  
  2. <%@ Language="VBScript" %>
  3. <% Option Explicit %>
  4. <%
  5. Dim theComponent(14)
  6. Dim theComponentName(14)
  7.  
  8. ' Lista dos Componentes
  9. theComponent(0) = "ADODB.Connection"
  10. theComponent(1) = "SoftArtisans.FileUp"
  11. theComponent(2) = "AspHTTP.Conn"
  12. theComponent(3) = "AspImage.Image"
  13. theComponent(4) = "LastMod.FileObj"
  14. theComponent(5) = "Scripting.FileSystemObject"
  15. theComponent(6) = "SMTPsvg.Mailer"
  16. theComponent(7) = "CDONTS.NewMail"
  17. theComponent(8) = "Jmail.smtpmail"
  18. theComponent(9) = "SmtpMail.SmtpMail.1"
  19. theComponent(10) = "Persits.Upload.1"
  20. theComponent(11) = "UnitedBinary.AutoImageSize"
  21. theComponent(12) = "aspSmartUpload.SmartUpload"
  22. theComponent(13) = "DAO.DBEngine.35"
  23.  
  24. ' Apelido dos Componentes
  25. theComponentName(0) = "ADODB"
  26. theComponentName(1) = "SA-FileUp"
  27. theComponentName(2) = "AspHTTP"
  28. theComponentName(3) = "AspImage"
  29. theComponentName(4) = "LastMod"
  30. theComponentName(5) = "FileSystemObject"
  31. theComponentName(6) = "ASPMail"
  32. theComponentName(7) = "CDONTS"
  33. theComponentName(8) = "JMail"
  34. theComponentName(9) = "SMTP"
  35. theComponentName(10) = "Persits Upload"
  36. theComponentName(11) = "AutoImageSize"
  37. theComponentName(12) = "ASpSmartUpload"
  38. theComponentName(13) = "DBEngine"
  39.  
  40. Function IsObjInstalled(strClassString)
  41. On Error Resume Next
  42. IsObjInstalled = False
  43. Err = 0
  44.  
  45. Dim xTestObj
  46. Set xTestObj = Server.CreateObject(strClassString)
  47. If 0 = Err Then IsObjInstalled = True
  48. Set xTestObj = Nothing
  49. Err = 0
  50. End Function
  51. %>
  52. <table border="1" cellpadding="0" cellspacing="0" width="100%"><tbody>
  53. <tr>
  54. <td align="center"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>Componentes
  55. instalados:</strong></font></td>
  56. </tr>
  57. <tr>
  58. <td>
  59. <table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody>
  60. <tr>
  61. <td>" & vbCrLf
  62. Response.Write "<strong>" & theComponentName(i) & "</strong>" & vbCrLf
  63. Response.Write "</td>
  64. </tr>
  65. </tbody></table>
  66. </td>
  67. </tr>
  68. </tbody></table>
  69.  

Dica: Acesse também http://www.webly.com.br/

28
Feb/08
0


Conexões com os banco mais usados em ASP

  1. <%'ACCESS - ODBC
  2. Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\pasta\banco.mdb;Uid=Admin;Pwd=;
  3.  
  4. '-----------------------------------------------------------------------
  5. '-----------------------------------------------------------------------
  6.  
  7. 'Access 2007 - ACE OLEDB 12.0
  8. Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\pasta\banco.accdb;Persist Security Info=False;
  9.  
  10. '-----------------------------------------------------------------------
  11. '-----------------------------------------------------------------------
  12.  
  13. 'MySQL - ODBC
  14. Driver={mySQL};Server=localhost;Option=16834;Database=Nome_Base;
  15.  
  16. 'ou
  17. Driver=MySQL ODBC 3.51 Driver;DataBase=Nome_Base;Server=localhost;Uid=;PassWord=;
  18.  
  19. '-----------------------------------------------------------------------
  20. '-----------------------------------------------------------------------
  21.  
  22. 'Oracle
  23. Driver={Microsoft ODBC for Oracle};Server=localhost;Uid=;Pwd=;
  24.  
  25. 'ou versão old
  26. Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;
  27.  
  28. '-----------------------------------------------------------------------
  29. '-----------------------------------------------------------------------
  30.  
  31. 'SQL Server - ODBC
  32. Driver={SQL Server};Server=localhost;Database=Nome_Base;Uid=;Pwd=;
  33.  
  34. '-----------------------------------------------------------------------
  35. '-----------------------------------------------------------------------
  36.  
  37. 'Postgre SQL
  38.  
  39. 'Standard
  40. Driver={PostgreSQL};Server=localhost;Port=5432;Database=Nome_Base;Uid=;Pwd=;
  41.  
  42. 'ANSI
  43. Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=Nome_Base;Uid=;Pwd=;
  44.  
  45. '-----------------------------------------------------------------------
  46. '-----------------------------------------------------------------------
  47.  
  48. 'Firebird - ODBC - IBPhoenix Open Source
  49. Driver=Firebird/InterBase(r) driver;Uid=;Pwd=;DbName=D:\FIREBIRD\banco\banco.fdb;%>

Dica: Acesse também: Webly

25
Feb/08
0


Imagens Aleatórias : Randomize

Mais um randomize de Imagens adaptado para as necessidade básicas

  1.  
  2. <%@ Language="VBScript" %>
  3. <% Option Explicit %>
  4.  
  5. <%
  6. Function RandomDeImagens(strPath,strDefault)
  7. On Error Resume Next
  8. Randomize Timer
  9.  
  10. Dim ObjDeFSO, objFolder, ObjDaPasta, ObjPasta02
  11. Dim StrPastas, StrImagens, StrBase, StrPasta
  12. Const strValid = ".gif.jpg.png"
  13.  
  14. If Right(strPath,1) <> Chr(47) Then strPath = strPath & Chr(47)
  15.  
  16. StrBase = Server.MapPath(strPath)
  17. Set ObjDeFSO = Server.CreateObject("Scripting.FileSystemObject")
  18.  
  19. Set objFolder = ObjDeFSO.GetFolder(StrBase)
  20. Set ObjDaPasta = objFolder.Files
  21.  
  22. For Each ObjPasta02 In ObjDaPasta
  23. StrPasta = LCase(ObjPasta02.Name)If Instr(strValid,Right(StrPasta,4)) Then
  24. StrPastas = StrPastas & StrPasta & VbTab
  25. End If
  26. Next
  27.  
  28. StrImagens = Split(StrPastas,VbTab)
  29.  
  30. If UBound(StrImagens) > 1 Then
  31. RandomDeImagens = strPath & StrImagens(Int(Rnd(1)*UBound(StrImagens)))
  32. Else
  33. RandomDeImagens = strDefault
  34. End If
  35.  
  36. End Function
  37. %>
  38. <p align="center"> </p>
  39.  
  40. <center>
  41. <table border="1" bordercolor="#000000"><tbody>
  42. <tr>
  43. <td bgcolor="#ffffff">
  44. <!-- a pasta developercenter é relacionanda a sua pasta principal -->
  45. <img src="<%=RandomDeImagens%>" />
  46. </td>
  47. </tr>
  48. </tbody></table>
  49. </center>

Página 6 de 6«123456



Portfólio Ted k'

Atualize seu Navegador