DISABLE ADBLOCK

ADBlock is blocking some content on the site

ADBlock errore
  •   php
  •  | 
  •  
  •  | 
  •   ( words)
 Checked

Question

I would like to change the site content in realation to a GET variable from the URL for exmaple:

www.example.com/index.php?a=products
www.example.com/index.php?a=contact

My site contains 3 blocks:

  • navigator
  • left block
  • right block

The block that would be dynamic is the right one. Using require/include is impossible because it's not the first thing I print and then I'll probably get a headers already sent error.

<?php
echo "Navigator will be printed here";
echo "Left block will be printed here";
require 'dynamic_content.php';

So how can I do that?

No correct solution

OTHER TIPS

Either redesign your project structure (recommended) or use Output Buffering functions:

<?php

ob_start();

echo "Navigator will be printed here";
echo "Left block will be printed here";
require 'dynamic_content.php';

ob_end_flush();

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow