GetAdvertisement 方法从 Rotator Schedule 文件中获取下一个广告。每次运行脚本时,例如当用户打开或刷新一页时,此方法会获取下一个安排的广告。
GetAdvertisement(rotationSchedulePath)
返回在当前页中显示广告的 HTML。
下面的示例从 Adrot.txt 文件中获取广告,此文件位于 /Ads/ 虚拟目录下。
<% Set NextAd = Server.CreateObject("MSWC.AdRotator") %>
<%= NextAd.GetAdvertisement("/ads/adrot.txt") %>