FFighter
06-07-2005, 04:49 PM
What I want to do is something very simple - include other php in a PHP class used by AMFPHP as a service for the Flash Remoting so I can use the resources in my service class.
E.g: I need to use the phpAdsNew in my flash website. So I did a little modification to the code and then created a Ads.php service. The file looks like this:
include "../system/Ads/phpadsnew.inc.php";
class Ads() {
function Ads() {
$this->methodTable = array(
"getBanner" => array(
"description" => "Pega um banner do sistema PHPAdsNew",
"access" => "remote",
"arguments" => array("what")
)
);
}
function getBanner($what) {
//does not work:
$arr = view_raw($what);
return $arr; //it does not return anything to flash... :/
}
When I take out the "$arr = view_raw($what)" line and change the return to return "SOMETHING" for test purposes, it works, the string is sent to the server :confused: what could I do to bypass/fix it?
E.g: I need to use the phpAdsNew in my flash website. So I did a little modification to the code and then created a Ads.php service. The file looks like this:
include "../system/Ads/phpadsnew.inc.php";
class Ads() {
function Ads() {
$this->methodTable = array(
"getBanner" => array(
"description" => "Pega um banner do sistema PHPAdsNew",
"access" => "remote",
"arguments" => array("what")
)
);
}
function getBanner($what) {
//does not work:
$arr = view_raw($what);
return $arr; //it does not return anything to flash... :/
}
When I take out the "$arr = view_raw($what)" line and change the return to return "SOMETHING" for test purposes, it works, the string is sent to the server :confused: what could I do to bypass/fix it?