Jump to content

include file


datex

Recommended Posts

It works perfectly on mine. '/path/to/file.php' if it's not in the same folder.

What's in the php you're trying to include?

 

<?php
<table style="width:75%;margin-left:auto;margin-right:auto;}" summary="Trust Seals">
<tr>
<td style="text-align:center;width:50%;"><script type="text/javascript" src="[url]https://seal.verisign.com/getseal?host_name=www.pesnax.eu&size=L&use_flash=YES&use_transparent=YES&lang=en"></script><br[/url] />
<a href="[url]http://www.verisign.com/verisign-trust-seal[/url]" target="_blank"  style="color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">ABOUT TRUST ONLINE</a>
</td>      <td style="text-align:center;width:50%;"><!-- GeoTrust True Site [tm] Smart Icon tag. Do not edit. -->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
SRC="//smarticon.geotrust.com/si.js"></SCRIPT>
<!-- end GeoTrust Smart Icon tag --></td>
</tr>
</table>
?>

Link to comment
Share on other sites

That isn't PHP in that. If you intend to include html and no PHP, lose the start and end PHP tags in the file.

Remove <?php and ?>

 

I have added this after the last line in homepage.tpl:

 

{php} include('seals.html'); {/php}

 

And when uploaded a file called seals.html in the template directory containing this:

 

<table style="width:75%;margin-left:auto;margin-right:auto;}" summary="Trust Seals">
<tr>
<td style="text-align:center;width:50%;"><script type="text/javascript" src="[url]https://seal.verisign.com/getseal?host_name=www.pesnax.eu&size=L&use_flash=YES&use_transparent=YES&lang=en"></script><br[/url] />
<a href="[url]http://www.verisign.com/verisign-trust-seal[/url]" target="_blank"  style="color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">ABOUT TRUST ONLINE</a>
</td>      <td style="text-align:center;width:50%;"><!-- GeoTrust True Site [tm] Smart Icon tag. Do not edit. -->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
SRC="//smarticon.geotrust.com/si.js"></SCRIPT>
<!-- end GeoTrust Smart Icon tag --></td>
</tr>
</table>

 

Nothing is displayed

 

If I write "test text" instead of {php} include('seals.html'); {/php} it is shown at the correct place

Link to comment
Share on other sites

That isn't PHP in that. If you intend to include html and no PHP, lose the start and end PHP tags in the file.

Remove <?php and ?>

 

I have added this after the last line in homepage.tpl:

 

{php} include('seals.html'); {/php}

 

And when uploaded a file called seals.html in the template directory containing this:

 

<table style="width:75%;margin-left:auto;margin-right:auto;}" summary="Trust Seals">
<tr>
<td style="text-align:center;width:50%;"><script type="text/javascript" src="[url]https://seal.verisign.com/getseal?host_name=www.pesnax.eu&size=L&use_flash=YES&use_transparent=YES&lang=en"></script><br[/url] />
<a href="[url]http://www.verisign.com/verisign-trust-seal[/url]" target="_blank"  style="color:#000000; text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">ABOUT TRUST ONLINE</a>
</td>      <td style="text-align:center;width:50%;"><!-- GeoTrust True Site [tm] Smart Icon tag. Do not edit. -->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
SRC="//smarticon.geotrust.com/si.js"></SCRIPT>
<!-- end GeoTrust Smart Icon tag --></td>
</tr>
</table>

 

Nothing is displayed

 

If I write "test text" instead of {php} include('seals.html'); {/php} it is shown at the correct place

Link to comment
Share on other sites

I have added this after the last line in homepage.tpl:

{php} include('seals.html'); {/php}

And when uploaded a file called seals.html in the template directory

You're calling it from the wrong place. ;)

The final page is "rooted" in the main WHMCS directory, not the template directory. You would place the file in the same location as the main WHMCS installation to call it as you have here: 'seals.html'.

 

Move that file to the main WHMCS directory, and leave the include call as it is.

Does it work?

Link to comment
Share on other sites

You're calling it from the wrong place.

The final page is "rooted" in the main WHMCS directory, not the template directory. You would place the file in the same location as the main WHMCS installation to call it as you have here: 'seals.html'.

 

Move that file to the main WHMCS directory, and leave the include call as it is.

Does it work?

 

yes - thanks so much for your help :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated