Does anyone esle have issues with their site only showing 1 ad even though you have it coded to show 5? here is what I have in my pages. <!-- #INCLUDE Virtual=/ad_network.asp --> <%ads = ad_network%> <%=ads(0)%> - <%=ads(1)%><br> <%=ads(2)%> - <%=ads(3)%> - <%=ads(4)%><br> any help would be appreciated... Thanks Jeffrey
I was having the same problem. Just cleared it today. This happens if the text file can't be written to. The cause could be not having write permissions, or not having the path to the text file correct. I knew I had write permissions, so I wanted to prove that I had the path correct. I used the following code in a test page: Dim fso, MyFile Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile= fso.CreateTextFile("../files/testfile.txt", True) '************* use full path MyFile.WriteLine("This is a test.") MyFile.Close I then checked the folder and sure enough a file had been created. So, I wound up modifying the ads_network.asp file to remove the slash in the server.mappath line. That then worked. This is what I changed it to, making the path relative rather than absolute. ad_file = Server.MapPath("../files/ad_network_ads.txt") I tried it again and it worked. I had to refresh the page 5 times to get all 5 ads.
Mine seems to be writable because I am getting new ads. I may be a little lost on what my root actually is. I believe I am on a shared web server (not my own box) hosted somewhere out there.. I'll try to attach my .asp file so people can see and offer any advice.. Thanks in advance for the help.. Jeffrey
Okay, true, it does not seem to be writting to the file, however I can not seem to find the right path. Can someone guide me in the direction of finding my root and all that? I presumed my root was my address, but I have tried many different variations of paths and still nothing.. Help please? Thanks Jeffrey
I was using an old version of the .asp. I finally found the best, most recent for .asp code and it is working most fabulous... thanks for all that have posted here.. couldn't have done it without the posts.. Jeffrey