0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

メモ: phpビルトインサーバー、COMを使う

Last updated at Posted at 2020-05-07

最小構成

フォルダ構成

以下ファイルだけが必要
license.txt
php.exe
php7ts.dll
# フォルダ構成
server.bat

php\php.exe
php\php7ts.dll

docroot\index.php

docroot\.user.ini

[PHP]
; error
error_reporting = E_ALL & ~E_NOTICE
display_errors = On

; extensions
extension_dir = php\ext
;extension = com_dotnet
;extension = mbstring
;extension = pdo_sqlite

; mbstring
mbstring.language = Japanese
mbstring.internal_encoding = SJIS
mbstring.http_input = auto
mbstring.http_output = SJIS
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = none
mbstring.func_overload = 0

[Date]
date.timezone = "Asia/Tokyo"

ビルトインサーバーを起動

server.bat
php\php.exe ^
 -c docroot\.user.ini ^
 -S 0.0.0.0:8000 ^
 -t docroot

sqlite3 を使えるように

以下のファイルが必要。

php\libsqlite3.dll
php\ext\php_pdo_sqlite.dll

COM を使えるように

php\ext\php_com_dotnet.dll

IEを起動

docroot\ie.php
<?php
$ie = new com("InternetExplorer.Application") 
      or die("Unable to instantiate ie");
$ie->Visible = 1;
$ie->Navigate("https://qiita.com");
  • ocxの呼び出しは致命的エラーで出来なかった。(謎)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?