开发者

cakephp requestHandler check for swf/flash

Is there a way to check if a cakePHP action is b开发者_JAVA技巧eing called from an swf/flash movie like there is for Ajax using the requestHandler?


Put a named parameter in the URL that Flash is requesting:

eg. http://www.example.com/controller/action/flash:true

Check for this named parameter in your controller (or AppController) code:

if (isset($this->params['named']['flash'])) {
    ...
}


I don't believe so. A better option might be to create discrete controller actions that you only use from your Flash app.


Not the way I think you mean. The requestHandler can detect the type of request, but I think you're looking for the request source. It might be worth trying the getReferrer() method, but you may end up needing to add a click handler to the swf (if it's yours and you have that access).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜