在cakephp中实现imapbuilder
我使用 cakephp 创建了一个网页。现在我觉得主页上无聊的地图正在扼杀它。我买了 imapbuilder,它可以让你对图像进行闪光效果,但是我似乎无法让代码工作。
这是我粘贴在主页中的代码,但无法加载。我所看到的只是一个空白的方块。
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0"
width="800" height="747" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="imapbuilder/loader.swf" />
<param name="base" value="imapbuilder/" />
<param name="flashvars" value="datasource=urlife_map.xml" />
<param name="loop" value="false" />
<param name="menu" value="true" />
<param name="quality" value="best" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<embed src="imapbuilder/loader.swf" base="imapbuilder/" flashvars="datasource=urlife_map.xml" loop="false" menu="true" quality="best" wmode="transparent" bgcolor="#ffffff" width="800" height="747" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
我将相同的代码粘贴到一个单独的文件中并且它起作用了。我将文件夹 imapbuilder 保留在与主页文件相同的目录中。
有谁知道为什么这无法在我的网站上加载和运行?
I have created a web page using cakephp. Now I feel like my boring map on the main page is killing it. I bought imapbuilder which lets you do flash effects on images, however I don't seem to be able to get the code working.
Here is the code I pasted in my home page, but it won't load. All I see is a blank square.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0"
width="800" height="747" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="imapbuilder/loader.swf" />
<param name="base" value="imapbuilder/" />
<param name="flashvars" value="datasource=urlife_map.xml" />
<param name="loop" value="false" />
<param name="menu" value="true" />
<param name="quality" value="best" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<embed src="imapbuilder/loader.swf" base="imapbuilder/" flashvars="datasource=urlife_map.xml" loop="false" menu="true" quality="best" wmode="transparent" bgcolor="#ffffff" width="800" height="747" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
This same code I pasted into a separate file and it worked. I kept the folder imapbuilder on the same directory as the home page file.
Does anyone have an idea why this won't load and work on my website?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
仅当使用标准 CakePHP 设置位于应用程序的 webroot 目录内时才能访问文件。
我建议您将 imapbuilder 文件夹移至 webroot 文件夹,并使用 / 附加对其的所有引用(例如 /imapbuilder/loader.swf 而不仅仅是 imapbuilder/loader.swf)。
Files can only be accessed if they are located inside the webroot directory of your app using a standard CakePHP setup.
I suggest you move the imapbuilder folder to the webroot folder and also append all references to it with a / (e.g. /imapbuilder/loader.swf instead of just imapbuilder/loader.swf).
我认为对您来说更简单的解决方案是使用 iMapBuilder.net——这是 iMapbuilder 的在线版本。然后,地图将远程托管在他们的服务器上,您所需要做的就是复制并粘贴他们的代码,这样就不会出现文件复制/目录问题。
我在一些基于 CMS 的网站上使用了 imapbuilder.net,例如 dotnetnuke 和 wordpress。基于在线地图的解决方案比 Windows 版本容易得多,至少对于基于 CMS 的网站来说是这样。
I think an easier solution for you is to use iMapBuilder.net -- which is the online version of iMapbuilder. The map will then be remotely hosted on their server, and all you need to do is copy and paste their code so that no file copying / directory issues.
I have used imapbuilder.net on few CMS based sites, e.g. dotnetnuke and wordpress. And the online based map solution is a lot easier than their Windows version, at least for CMS based sites.