0

ChartDirectorv.5APIに問題があります

コードを自分のWebサイトにドラッグアンドドロップします。

特定のページに移動すると、エラーメッセージが表示されます。

PHP拡張機能のChartDirectorの読み込み中にエラーが発生しました

ChartDirectorを動的にロードしようとしましたが、成功しませんでした。PHPのドキュメントについては、ChartDirectorを参照するか、問題を解決する方法については、ここをクリックしてください。

エラーログ

Trying to load "phpchartdir530.dll" from the PHP extension directory "c:/wamp/bin/php/php5.3.5/ext/".
Fatal error: Call to undefined function dl() in C:\wamp\www\OrdiDepot\application\views\phpchartdir.php on line 44 
Call Stack: 0.0018 378216 
1. {main}() C:\wamp\www\OrdiDepot\index.php:0 0.0036 427824 
2. require_once('C:\wamp\www\OrdiDepot\system\codeigniter\CodeIgniter.php') C:\wamp\www\OrdiDepot\index.php:115 0.0329 1386232 
3. call_user_func_array() C:\wamp\www\OrdiDepot\system\codeigniter\CodeIgniter.php:236 0.0329 1386280 
4. ordiDepot->apropos() C:\wamp\www\OrdiDepot\system\codeigniter\CodeIgniter.php:0 0.0344 1392432 
5. CI_Loader->view() C:\wamp\www\OrdiDepot\application\controllers\ordiDepot.php:64 0.0344 1393128 
6. CI_Loader->_ci_load() C:\wamp\www\OrdiDepot\system\libraries\Loader.php:307 0.0354 1452168 
7. include('C:\wamp\www\OrdiDepot\application\views\apropos.php') C:\wamp\www\OrdiDepot\system\libraries\Loader.php:677 0.0537 3934888 
8. require_once('C:\wamp\www\OrdiDepot\application\views\phpchartdir.php') C:\wamp\www\OrdiDepot\application\views\apropos.php:49 0.0538 3980304 
9. cdLoadDLL() C:\wamp\www\OrdiDepot\application\views\phpchartdir.php:174 

require_onceファイルの場合..ビューと同じディレクトリに配置します(MVCモデルを使用します)

これが私のコードです:

<div class="center_content">
   <div class="center_title_bar">À propos</div>
     <div class="prod_box_big">
        <div class="top_prod_box_big"></div>
        <div class="center_prod_box_big">            
                 <div class="details_big_box">
                    <div class = "info_compagnie">
    L’entreprise OrdiDépôt Inc. est une PME de Montréal qui 
    a été créée en 2010. Elle œuvre dans le domaine de l’informatique 
    et le divertissement  PC.  OrdiDépôt Inc. est une compagnie de 
    vente de matériel dans ces domaines. Nous offrons :   pièces 
   d’ordinateurs, systèmes complets et Jeux PC.
</div>
<div class = "graphic">
<?php
    require_once('phpchartdir.php');

    # The data for the pie chart
    $data = array(25, 18, 15, 12, 8, 30, 35);

        # The labels for the pie chart
    $labels = array("Labor", "Licenses", "Taxes", "Legal", "Insurance", "Facilities",
                                "Production");

                            # Create a PieChart object of size 450 x 270 pixels
                            $c = new PieChart(450, 270);

                            # Set the center of the pie at (150, 100) and the radius to 80 pixels
                            $c->setPieSize(150, 135, 100);

                            # add a legend box where the top left corner is at (330, 50)
                            $c->addLegend(330, 60);

                            # modify the sector label format to show percentages only
                            $c->setLabelFormat("{percent}%");

                            # Set the pie data and the pie labels
                            $c->setData($data, $labels);

                            # Use rounded edge shading, with a 1 pixel white (FFFFFF) border
                            $c->setSectorStyle(RoundedEdgeShading, 0xffffff, 1);

                            # Output the chart
                            header("Content-type: image/png");
                            print($c->makeChart2(PNG));
                        ?>
                    </div>
                 </div>                        
        </div>
       <div class="bottom_prod_box_big"></div>                                
     </div>
   </div>     <!-- end of center content -->  

ありがとうございます

4

1 に答える 1

0

dl実行時に拡張機能の動的読み込みを実行するため に、コードが呼び出しを試みているようです。5.3 の時点で PHP からdl削除されました。

拡張機能をロードする必要がある場合は、php.ini ファイルを変更する必要があります。php.ini ファイルで拡張機能のリストを探し、そこに追加します。ChartDirectorには、そうするための基本的な指示があるようです。

他の製品を検討したい場合があります。 ChartDirector のインストール ドキュメントは PHP4 用に書かれているように見えますが、これは一般的に悪い兆候です。

Windows 上の PHP 用 ChartDirector には、少なくとも PHP バージョン 4.0.4pl1 が必要であり、PHP バージョン 4.3.4 (このドキュメントの日付時点での最新の PHP リリース) までテストされています。

于 2011-03-24T20:30:05.413 に答える