Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-26 23:38:09

SkyMatt70
New Member
From: Michigan
Registered: 2009-03-26
Posts: 1
Website

[resolved] <txp:php>include executed twice per view

In the header of my site I have a <txp:php>include ‘./thedir/thefile.php’;</txp:php>. This include file is being executed twice per page view. Is there any reason it would be called twice but only displayed once?

The header is called from the default template via <txp:output_form form=“the_head” />

Last edited by SkyMatt70 (2009-03-26 23:56:58)

Offline

#2 2009-03-27 03:45:58

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [resolved] <txp:php>include executed twice per view

Not sure, but you can avoid it by using include_once instead of include.

We’d really need to see a tag trace of your page to see what’s happening.

Offline

#3 2009-03-27 12:49:13

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,274
Website

Re: [resolved] <txp:php>include executed twice per view

Widely unknown fact: Textpattern parses each page template twice.

Offline

Board footer

Powered by FluxBB