With phpCMS you can merge as many as desired scripts in one content file. This documentation describes how to merge your existing PHP scripts. At present the script integration is still very new, so the header output is still something "tricky". :-). For a correct output of headers you need modifications in the template file and the content file.
In the template file you have to note only a placeholder beginning with "{SCRIPT". (Of cause without the quotes.) Now this placeholder is followed by a unique name for this script. The complete definition then looks like this:
{SCRIPT_NR1}
This script placeholder now works like a normal placeholder. If you need to output HTTP-Headers in your scripts so divide your scripts in two pieces. One of them holds the HTTP-Headers in it and the other the main program. The program which sends tht HTTP-Headers should called on the beginning of the template.
You can chose in every content file which script should merged with the content. It is also possible to not define a script so the script tag in the template will be ignored. To define which script the parser should merge with the content write "{SCRIPT" (without quotes) followes by the unique name:
{SCRIPT_NR1} ./guestbook.php
Valid path definitions are for example:
{SCRIPT_NR1} ./guestbook.php
{SCRIPT_NR1} ../cgi-bin/guestbook.php
{SCRIPT_NR1} $home/cgi-bin/guestbook.php
{SCRIPT_NR1} /cgi-bin/guestbook.php
the variable "$home" is only defined if "HOME" is defined in the project file.