pCharts のドキュメントによると、このコードを使用してブラウザに画像をレンダリングできるはずです。
mypic.php
$myPicture->stroke;
mypage.html
<IMG SRC=‘mypic.php‘>
このimg
タグは、php スクリプトを呼び出すことになっています。PHP スクリプト内で、ストローク関数はcontent-type: image/png
.
だからここに私が持っているものがあります:
netsales.php
<?php
include('../class/pData.class.php');
include('../class/pDraw.class.php');
include('../class/pImage.class.php');
/* query sales and create new image */
$myPicture->stroke;
?>
index.php
<?php
include ('netsales.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div>
<img src="netsales.php" />
</div>
</body>
</html>
エラーは発生しません。画像が見つからない場合は赤い X が表示されます。