doushang9172 2012-06-18 19:39
浏览 38

Php SDK Facebook出错 - 奇怪的错误

  if(isset($basic)){
    function meme(){
    $i = 1;
    while(file_exists("pg/".$i.".jpg")){
    $file[$i] = "pg/".$i.".jpg";
    $i++;
    }
    }
    $file[1] = 'pg_1.jpg';
    $file[2] = 'pg_2.jpg';
    $file[3] = 'pg_3.jpg';
    $file[4] = 'pg_4.jpg';
    $file[5] = 'pg_5.jpg';
    $file[6] = 'pg_6.jpg';
    $file[7] = 'pg_7.jpg';
    $file[8] = 'pg_8.jpg';
    $file[9] = 'pg_9.jpg';
    $file[10] = 'pg_10.jpg';
    $file[11] = 'pg_11.jpg';
    $file[12] = 'pg_12.jpg';
    $file[13] = 'pg_13.jpg';
    $file[14] = 'pg_14.jpg';

    $tuomeme = 'pg/'.$file[rand(1, 14)];
    $album_details = array(
            'message'=> 'CiaoCiao',
            'name'=> 'CiaoCiaoCiao'
    );
    $create_album = $facebook->api('/me/albums', 'post', $album_details) or die("Errore nella connessione con Facebook");
    $album_uid = $create_album['id'];
    $photo_details = array(
        'message'=> he(idx($basic, 'name')).''
    );
    $finale=$tuomeme;
    $photo_details['image'] = '@' . realpath($finale);
    $upload_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details) or die("Errore nella connessione con Facebook");

bold The error are:

[18-Jun-2012 19:30:32 UTC] PHP Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/xtigbexz/public_html/dev/index.php:27) in /home/public_html/sdk_php/facebook.php on line 7 [18-Jun-2012 19:30:32 UTC] PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/public_html/dev/index.php:27) in /home/xtigbexz/public_html/sdk_php/facebook.php on line 7 [18-Jun-2012 19:30:36 UTC] PHP Fatal error: Uncaught CurlException: 26: couldn't open file ""

thrown in /home/public_html/sdk_php/base_facebook.php on line 423

Can you help me? Please!

  • 写回答

1条回答 默认 最新

  • dongmei8511 2012-06-18 19:52
    关注

    Line 27 of your file /home/xtigbexz/public_html/dev/index.php is generating output. You're calling the Facebook API after that, which is trying to set a $_SESSION or $_COOKIE variable. You can't set either of those after your script has generated some output.

    评论

报告相同问题?

悬赏问题

  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。