Am gettin an error msg like this-->
The image “http://localhost/linegrph.php” cannot be displayed, because it contains errors.
while tryin 2 run my code on localhost..

Wen I comment d statemnt, $graph->Stroke(), nthng at all displys..
Plseeee do tell me a solution..

Thnks in advance :)

Recommended Answers

All 6 Replies

What error messages are you getting? Can you post them on here.

Please post the code for filename.php

This is d sample pgm I hav taken frm d tutorials..

include ("jpgraph.php" );
include ("jpgraph_line.php");

// Some data
$ydata=array(11,3, 8,12,5 ,1,9, 13,5,7 );

// Create the graph. These two calls are always required
$graph=new Graph(350, 250,"auto");

// Create the linear plot
$lineplot=new LinePlot($ydata);

// Add the plot to the graph

// Display the graph

I think the class itself has the error.Try to check them more intensively to find out why it is not working.

put php_value output_buffering "0" in your .htaccess or

Set output_buffering=Off in php.ini file.

put ob_clean();
in your image generating script.
Thats it.
Hope This will help you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.