Adding a php statement

More
2 days 8 hours ago #73630 by trogladyte
Hey Ced

I have the following statement I need to add before </head> on my own site ( www.citruskiwi.com ):
Code:
<?php include(realpath(getenv('DOCUMENT_ROOT')) . '/blackhole/index.php'); ?>

I added it to Code | Custom Code in TC and it's saved fine, but, if I do a "Page Source" query it doesn't show, and the bot trap it should run doesn't run. I've added this sort of thing on other sites using this method and it has worked, so I'm stumped as to why it didn't this time.

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Please Log in or Create an account to join the conversation.

More
1 day 16 hours ago #73632 by ced1870
Replied by ced1870 on topic Adding a php statement
Hi
I have tested it, it works. Check that you have the customheader.php file in your template folder with your code in it
Check that you have applied the changes to the template, not only saved the custom code, else the template will not include it

CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
1 day 16 hours ago #73633 by trogladyte
Replied by trogladyte on topic Adding a php statement
Thanks for the info Ced. I never knew where that info was saved. Yes, it's there as it should be. I was just surprised that it doesn't show on a Page Source query.

OK, looks like I have done something else wrong! Cheers.

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!

Please Log in or Create an account to join the conversation.

More
1 day 15 hours ago #73634 by ced1870
Replied by ced1870 on topic Adding a php statement
if it still does not work, edit the index.php file from the template and check if there is the call to the "customheader.php" file in it
let me know

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
1 day 15 hours ago - 1 day 8 hours ago #73635 by trogladyte
Replied by trogladyte on topic Adding a php statement
Yep it's there
Code:
<?php include('customheader.php'); ?>.

I must have goofed up elsewhere I guess. I just wonder why it doesn't show up in a Page Source. If you use the URL www.citruskiwi.com/blackhole , you should see the page that's in the attachment. What I'm trying to do is at  perishablepress.com/blackhole-bad-bots/#blackhole-download

A good landing is one you can walk away from.
A great landing is one where you can reuse the aircraft!
Attachments:
Last edit: 1 day 8 hours ago by trogladyte.

Please Log in or Create an account to join the conversation.

More
1 day 28 minutes ago #73637 by ced1870
Replied by ced1870 on topic Adding a php statement
if your template calls the file that calls your function... the problem is not there

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.224 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 351 guests and one member online