Example #1
0
 private function __uploadFile($filePath)
 {
     $paf = Arch_Paf::instance('image');
     fwrite(fopen('d:/upload_1.log', 'w'), $filePath);
     $param = array('module' => 'image', 'file' => file_get_contents($filePath), 'size' => array(100));
     $res = $paf->call('publish', $param);
     if ($res['flag'] == 0) {
         return $res['data']['100'];
     }
     fwrite(fopen('d:/upload_2.log', 'w'), serialize($res));
     Core_Log::fatal('avatar upload fail', $res);
     return false;
 }
Example #2
0
function testNotice()
{
    $paf = Arch_Paf::instance('notice');
    $r = $paf->call('sms/send', array('module' => 'guirenli', 'tel' => '18165305471', 'txt' => '查一下今天晚上有没有曼联的比赛'));
    var_dump($r);
}