Konu Başlığı: Degişkene göre include [ASP]
View Single Post
Sponsorlu Bağlantılar
Zoque.Forum
Advertisement
Old 03.12.2003   #11 (permalink)
pixage
 
pixage's Avatar
 
Üyelik Tarihi: 08.08.2001
Yer: istanbul
Yaş: 28
Mesaj: 844
Görsel: 3
Teşekkür Ederim arkadaşlar, konuyla ilgili olan işimde include edilecek sayfların isim bilgileri veritabanından çekileceğinden ve içerikleri salt HTML olduğundan, execute sanırım bu durumda en iyi çözüm gibi duruyor. @ssonmez'in belirttiği "Select" döngüsü ile dinamik include işlemi, sadece siz kodu yazarken varlığını bildiğiniz dosyaların include edilebilmesi ile ilgili olduğundan bu soruna çözüm olamıyor.

Ek olarak, calisto'nun verdiği adreste yer alan aşağıdaki örnekte, ASP kodları içeren bir dosyanın include işlemi için ideal gibi gözüküyor (henüz denemedim)
Kod:
  <%
'Pass the name of the file to the function.
Function getFileContents(strIncludeFile)
  Dim objFSO
  Dim objText
  Dim strPage

  'Instantiate the FileSystemObject Object.
  Set objFSO = server.CreateObject("Scripting.FileSystemObject")

  'Open the file and pass it to a TextStream Object (objText). The
  '"MapPath" function of the server Object is used to get the
  'physical path for the file.
  Set objText = objFSO.OpenTextFile(server.MapPath(strIncludeFile))

  'Read and return the contents of the file as a string.
  getFileContents = objText.ReadAll

  objText.Close
  Set objText = Nothing
  Set objFSO = Nothing
End Function
%>
Verdiğiniz bilgiler için tekrar teşekkürler arkadaşlar..
__________________
Ars longa vita brevis *
pixage.net:geometrik senfoni | işleyenkulak:kulaklar pas tutmasın
flickr:bir insan bin enstantane | macline:mac'te multimedya
pixage şu an çevrimdışı   Mesajdan alıntı yaparak yeni bir cevap ekleyin