出力バッファを変換する

  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. cssj_ob_start_main($session'file:/ob.html');
  17. ?>
  18.  
  19. <html>
  20.   <head>
  21.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  22.     <link rel="StyleSheet" type="text/css" href="test.css">
  23.     <title>Hello CSSJ</title>
  24.   </head>
  25.   <body>
  26.     <h2>ただいまの時刻</h2>
  27.     <p><?php echo date("l dS of F Y h:i:s A"?></p>
  28.   </body>
  29. </html>
  30.  
  31. <?php
  32. //出力結果の変換の終了
  33.  
  34. //セッションの終了
  35. cssj_close($session);
  36.  
  37. ?>

Documentation generated on Sat, 23 May 2009 14:49:07 +0900 by phpDocumentor 1.4.1