It is possible to do both - as a phpblock type.
Examples of simple phpblocks - which are defined in lib-custom.php:
-------
function phpblock_blocktest () {
$display = "Hello World";
return $display;
}
-------
function phpblock_getweather () {
global $_CONF;
$path = $_CONF['path_html'] . "weather";
include_once($path . "/display_weather.php"
;
$display = getweather();
return $display;
}
-------
You will notice how the block output is assigned to a variable and appended as it's build. The output text in $display is then returned and formatted into the block.
The second example is where the phpblock calls an external main file which is written to return it's final assembled output text in a variable which is assigned to $display and then finally returned to the GL code for formatting into the block.
Blaine