Dear All, 😕
I am trying to impress my ASP mates with PHP! Which is faster and quicker, cooler, etc. Anyway I am converting an old asp class library we use to develop ASP applications.
Now to try explain the problem:
=== Code for first page: index.php
include 'classes\generatepage\generatepage.php';
$page = new generatepage/COLOR;
$page->returnFunction = "main()"
$page->draw()
funtion Main() {
[INDENT] // want this to be executed / called in the $page object! before $page is destroyed
// page stuff[/INDENT]}
==== End index.php
Inside the genereatePage.php class a function runs called draw content
snippet below-
function drawContent(){
[INDENT]if(!$this->returnFunction = NULL) {
[INDENT]echo ("<p>drawContent not implemented yet</p>");
//Want this to execute the main() funtion specified in index.php[/INDENT]
}[/INDENT]
}
WARNING M$ ASP
I want this to do something similar to the ASP code below
public sub drawContent()
[INDENT]if not contentSub = empty then execute("call " & contentSub)
// in this case contentsub will be main()[/INDENT]
end sub
Well I hope someone understands and is able to help,
Thanks!
David 😕