macromedia flash actionscript scripting, php, remoting, webservices, c#, javascript
<?php
// Include the request-resolve
// class
require_once 'Request.php';
// the class which handles
// our requests
class RequestResolver
{
// declare a receiver-method
function sayHello ($param)
{
echo 'Hello '. $param .'<br />';
}
// declare another receiver-method
function sayGoodbye ($param)
{
echo 'Goodbye '. $param .'<br />';
}
// declare another receiver-method
function divideBy2 ($param)
{
echo $param / 2;
}
}
?>
<html>
<head><title>Request.php</title></head>
<body>
<h4>Result:</h4>
<?php
// start resolving requests,
// with our RequestResolver-class
// as context
Request::resolve(new RequestResolver);
?>
<h4>Test get-requests</h4>
<a href="<?php basename(__FILE__) ?>?sayHello=world">sayHello(world)</a><br />
<a href="<?php basename(__FILE__) ?>?sayGoodbye=world">sayGoodbye(world)</a><br />
<h4>Test post-request</h4>
<form action="<?php basename(__FILE__) ?>" method="post">
<label>divideBy2:</label>
<input type="text" name="divideBy2" /><br />
<input type="submit" />
</form>
</body>
</html>
Posted by hOk at January 3, 2004 01:27 PM
Comments (0)
|
You can use <code>code that should be highlightned</code> to highlight code! Optionally you can use the attribut language="php|perl|java" within the code tag, otherwise actionscript-highlightning will be used. |
