I'm trying to figure out how I can do this or something like it.
let's say I have script A:
<?php
$input = "something"
//somehow call the somefunc() function from this script (I don't know how)
echo(somefunc($input));
?>
and script B:
<?php
function somefunc($input)
{
$output = $input." else";
return $output;
}
?>
so then the html output from script A should be:
something else
I tried doing include("scriptB.php?input=something"); but that just includes the php code for script B, not the output it generates. I could do that and then call the function after that code has been added to script A.
but that's what I'm trying to avoid. script B is very very large, so I don't want it to be loaded into the calling script first. I also want to keep functions a little bit more orgainzed in this fashion: by breaking them up among multiple scripts.
I was thinking maybe there's some way to do this sort of thing with http get....or some php thing I'm not aware of.
have any ideas?
let's say I have script A:
<?php
$input = "something"
//somehow call the somefunc() function from this script (I don't know how)
echo(somefunc($input));
?>
and script B:
<?php
function somefunc($input)
{
$output = $input." else";
return $output;
}
?>
so then the html output from script A should be:
something else
I tried doing include("scriptB.php?input=something"); but that just includes the php code for script B, not the output it generates. I could do that and then call the function after that code has been added to script A.
but that's what I'm trying to avoid. script B is very very large, so I don't want it to be loaded into the calling script first. I also want to keep functions a little bit more orgainzed in this fashion: by breaking them up among multiple scripts.
I was thinking maybe there's some way to do this sort of thing with http get....or some php thing I'm not aware of.
have any ideas?