public function checkMobile() { $int = N::checkMobile($this->mobile); if (!$int) { $this->addError('mobile', '手机号格式不正确'); } }
/** * 访问远程数据 */ public static function fetchRemoteResult($component, $action, $params) { if (!($ip = N::cache()->get('server_ip'))) { $ip = N::db()->queryScalar('config', 'value', array('varname = :varname', array(':varname' => 'server_domain'))); #$ip = 'test.anoah.com'; # for test N::cache()->set('server_ip', $ip); } $internetUrl = 'http://' . $ip . '/api/?q=json/' . str_replace('.', '/', $component) . '/' . $action; $result = self::httpPost($internetUrl, array('info' => json_encode($params))); return json_decode($result); }
public static function f1() { echo "Accessing self:\n"; echo "psf returns " . self::psf() . "\n"; echo "psProp = " . self::$psProp . "\n"; echo "MYPI = " . self::MYPI . "\n"; echo "Accessing parent(s)\n"; echo "psf returns " . parent::psf() . "\n"; echo "psProp = " . parent::$psProp . "\n"; echo "MYPI = " . parent::MYPI . "\n"; }
<?php $a = array('B' => C::D('E', F::G, H), 'I' => isset($b['J']) ? K : L, 'M' => N::O('P', Q::R), 'S' => T(U::V('W', X::Y)), 'Z' => AA($c['AB']) ? AC(0, AD($d['AE'])) : $e['AF']);
<?php $a['B'] = C::D('E'); $b['F'] = G::H('I'); if (J::K('L')) { $c['M'] = N::O('P'); } if (!empty($d->Q)) { $e['R'] = $f->S; } T::U($g->V()->W($h));