日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

Bitcoin0.21版 公链开发(5) PHP集成到Apache中(windows平台)

發布時間:2025/3/21 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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.so

3. 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 .html

4. 在apache/htdocs新建文件index.php

<?phpphpinfo(); ?>

5. 支持curl

在php.ini中開啟curl擴展:
在php的目錄下,找到 libssh2.dll 復制(或剪切)粘貼到apache的bin目錄下
網上說還有libeay32.dll,ssleay32.dll這兩個文件,應該是老版本的事情,我這里沒有這個文件。

測試是否支持curl
curl.php:

<?phpecho 'Curl: ', function_exists('curl_version') ? 'Enabled' . "\xA" : 'Disabled' . "\xA";?>

extension_dir = 寫上絕對路徑


【參考】

[1] windows下PHP運行環境配置
[2] PHP環境搭建-Windows系統下PHP環境搭建

總結

以上是生活随笔為你收集整理的Bitcoin0.21版 公链开发(5) PHP集成到Apache中(windows平台)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。