アプリケーション側のファイルを変換する

  1. <?php
  2. require_once ('../code/cssj_driver.php');
  3. header("Content-Type: application/pdf");
  4.  
  5. //ドライバの作成
  6. $driver cssj_create_driver_for('localhost'8099);
  7.  
  8. //セッションの開始
  9. $session cssj_create_session($driver'user''kappa'or die('サーバーに接続できません');
  10.  
  11. //リソースの送信
  12. cssj_ob_start_resource($session'file:/test.css');
  13. readfile('test.css');
  14.  
  15. //本体の変換
  16. $in fopen('test.html''r');
  17. cssj_ob_start_main($session'file:/test.html');
  18. for (;;{
  19.   $data fread($in8192);
  20.   if (strlen($data<= 0{
  21.     break;
  22.   }
  23.   echo $data;
  24. }
  25. fclose($in);
  26.  
  27. //セッションの終了
  28. cssj_close($session);
  29. ?>

Documentation generated on Wed, 10 Jun 2009 13:44:39 +0900 by phpDocumentor 1.4.1