【问题标题】:Inserting PHP code in Perl with html template [closed]使用 html 模板在 Perl 中插入 PHP 代码 [关闭]
【发布时间】:2013-06-13 09:22:35
【问题描述】:

从赞助商那里得到代码,它是用 PHP 编写的,遗憾的是我的网站是用 Perl 编写的,并且有 html 模板,当我尝试粘贴代码脚本时,它就不起作用了……我可能真的是编码新手可以帮我?这是代码:

   <?php
   // Replace the download URL.
   $download_url = "<TMPL_VAR direct_link>";
   // Replace the software name to appear in the installer.
   $software_name = "PUZZLE";
   // URL to a logo image. Must be configured through your affiliate manager.(Optional)
   $logo_image = "http://cdn.airdlrstatic.com/graphics/affiliate/yourname/image.png";
   // URL to a product image. Please consult your affiliate manager for details.
   $product_image = "";
   // Sub ID (Optional)
   $sub_id = "";
   // Software Bundle ID for tracking.
   $bundle = "c8d494949";
   ?>

   <a href='<?php include '/download/download.php'; ?>'>Click Here!</a>

有什么解决办法吗?

【问题讨论】:

标签: php perl


【解决方案1】:

PHP 代码放入PHP 文件中,然后在您希望显示的页面中添加iframe

假设您调用您的 php 文件 myfile.php 并在您希望它显示的网页中添加以下代码:

<iframe src="myfile.php" width="300" height="400" frameBorder="0"></iframe> 

显然还有其他(更好的)方法,但需要一些编码技能。这是无需任何复杂编码即可实现的最简单方法。

【讨论】:

  • +1,虽然我认为应该还有另一个选项可以在另一个窗口中打开框架。部分浏览器不支持iframe
猜你喜欢
  • 1970-01-01
  • 2013-07-19
  • 1970-01-01
  • 2021-03-18
  • 1970-01-01
  • 1970-01-01
  • 2014-06-22
  • 1970-01-01
  • 2010-09-14
相关资源
最近更新 更多