小编gth*_*t90的帖子

PHP Curl发布非英文字符

我有一个小问题与php curl post.

我试图将一些土耳其字符发布到一个论坛,但不会发布它应该如何.

这是我保存文本的方式:


    fwrite($fpp,"\xEF\xBB\xBF");
    fwrite($fpp, $row['template']);
    fclose($fpp);

和发布:

$this->curl = curl_init();
    curl_setopt ( $this->curl, CURLOPT_URL, $this->vb_url . 'newthread.php?' . $url_vars );
    curl_setopt ( $this->curl, CURLOPT_POST, true );
    curl_setopt ( $this->curl, CURLOPT_POSTFIELDS, $post_fields );
    curl_setopt ( $this->curl, CURLOPT_RETURNTRANSFER, true );
    curl_setopt ( $this->curl, CURLOPT_CONNECTTIMEOUT,20);
    curl_setopt ( $this->curl, CURLOPT_TIMEOUT,10);
    curl_setopt ( $this->curl, CURLOPT_HEADER, true );
    curl_setopt ( $this->curl, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt ( $this->curl, CURLOPT_COOKIE, $this->cookie_name );
    curl_setopt ( $this->curl, CURLOPT_COOKIEJAR, $this->cookie_name );
    curl_setopt ( $this->curl, CURLOPT_COOKIEFILE, $this->cookie_name );
    curl_setopt ( …
Run Code Online (Sandbox Code Playgroud)

php post curl utf-8

5
推荐指数
1
解决办法
7877
查看次数

标签 统计

curl ×1

php ×1

post ×1

utf-8 ×1