crop.php
来自「拓扑图基于SNMP数据采集模块的设计和实现」· PHP 代码 · 共 25 行
PHP
25 行
<?phpheader('Content-Type: application/json');/* yadl_spaceid - Skip Stamping */include('exampleslib.inc');// Use Services_JSONrequire_once('JSON.php');$json = new Services_JSON();$h = getRawData('height');$w = getRawData('width');$t = getRawData('top');$l = getRawData('left');$data = 'Height: '.$h;$data .= ', Width: '.$w;$data .= ', Top: '.$t;$data .= ', Left: '.$l;$response = new stdclass();$response->data = '<p>This example does not really resize, but here is the data we received: '.$data.'</p><p>If we used ImageMagick & PHP we could issue this command: convert yui.jpg -crop ['.$w.' x '.$h.' + '.$l.' + '.$t.'] yui-new.jpg</p>';echo($json->encode($response));?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?