Bitcoin0.21版 公链开发(5) PHP集成到Apache中(windows平台)
生活随笔
收集整理的這篇文章主要介紹了
Bitcoin0.21版 公链开发(5) PHP集成到Apache中(windows平台)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 修改默認的索引,以支持 PHP
# DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module>DirectoryIndex index.html </IfModule>-> # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module>DirectoryIndex index.html index.php index.htm </IfModule>2. 開啟 rewrite 功能
將下面這行代碼前面的 # 去掉:
LoadModule rewrite_module modules/mod_rewrite.so3. httpd.conf文件中添加 PHP的文件路徑
LoadModule php_module "G:/tool/php/php-8.0.3-Win32-vs16-x86/php8apache2_4.dll" PHPIniDir "G:/tool/php/php-8.0.3-Win32-vs16-x86/" AddType application/x-httpd-php .php AddType application/x-httpd-php .html4. 在apache/htdocs新建文件index.php
<?phpphpinfo(); ?>5. 支持curl
在php.ini中開啟curl擴展:
在php的目錄下,找到 libssh2.dll 復制(或剪切)粘貼到apache的bin目錄下
網上說還有libeay32.dll,ssleay32.dll這兩個文件,應該是老版本的事情,我這里沒有這個文件。
測試是否支持curl
curl.php:
extension_dir = 寫上絕對路徑
【參考】
[1] windows下PHP運行環境配置
[2] PHP環境搭建-Windows系統下PHP環境搭建
總結
以上是生活随笔為你收集整理的Bitcoin0.21版 公链开发(5) PHP集成到Apache中(windows平台)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Bitcoin0.21版 公链开发(4)
- 下一篇: Bitcoin 中的挖矿算法(1) 难度