Google Chart Aracı Örnek Çalışmıyor

0 Cevap php

Tabloyu oluşturmak için http://code.google.com/apis/chart/docs/post_requests.html verilen php sonrası isteği örnek kullanıyorum.

The code: chartserver-image.php

<?php
 // Create some random text-encoded data for a line chart.
 header('content-type: image/png');
 $url = 'http://chart.apis.google.com/chart';
 $chd = 't:';
 for ($i = 0; $i < 150; ++$i) {
 $data = rand(0, 100000);
 $chd .= $data . ',';
 }
 $chd = substr($chd, 0, -1);

// Add data, chart type, chart size, and scale to params.
$chart = array(
'cht' => 'lc',
'chs' => '600x200',
'chds' => '0,100000',
'chd' => $chd);

// Send the request, and print out the returned bytes.
$context = stream_context_create(
array('http' => array(
  'method' => 'POST',
  'content' => http_build_query($chart))));
fpassthru(fopen($url, 'r', false, $context));
?>

another_page.html

<img width='600' height='200' src='chartserver-image.php'>

I gösteriyor görünümü resmin üzerine tıkladığınızda Şimdi ben another_page.html erişirken, görüntü yüklemez

Görüntü "http://localhost/demo/chartserver-image.php" içerdiği hatalar nedeniyle, görüntülenemiyor.

I anlamak mümkün sorun nedir?

Bana bu konuda yardımcı olun

Teşekkürler

0 Cevap