问题
I have created a website in php where i have included a php file i.e header.php on the index page. The problem is that when i have install adblockerpro and open the website it displays everything correctly but the header.php code is not shown in output.
回答1:
It's likely that your header file contains a named DOM element or an offsite resource that is being blocked by AdBlock.
Things to look for:
Element ID and classes
Do you have any
<div>
elements (or other elements) with an id that sounds like an ad?For example:
<div id="adheader"> ... </div>
will likely be blocked by many adblockers, even if the div in question is not an ad. Words like "banner" or "ad" in the id or class name of any element are often problematic. Try changing the names of your element id's or classes.Offsite resources from filtered domains
Are you using any offsite resources (images, scripts, css, etc.) that exist on an AdBlocked domain?
For example: If you are using a javascript from a known ad-server, this script will likely be blocked. You can check https://easylist.adblockplus.org/en/ to see if any domains referenced within your code fall within a blocked domain.
Are elements on your domain specifically listed on filter lists?
Lastly, see if your site in particular is on any of the major adblocking lists. It is possible that users improperly added a necessary site-element (and not just an ad) to one of the major filter lists. If this is the case, you will need to visit the forums of the corresponding filter-list and post your individual case.
来源:https://stackoverflow.com/questions/34991860/php-code-being-blocked-by-adblocker