Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通常の PHP と MYSQL サーバーを実行していますが、CPU を集中的に使用する計算を実行したいと考えています。したがって、その部分を処理するために C プログラムを実行したいと考えています。
サーバー自体で PHP と C/C++ プログラムの間でデータを交換することは可能ですか?
よろしくPP
それは可能であり、それを達成する方法は複数あります。
上記から、エクステンションまたはギアマンを選択します。
C++ プログラムを作成し、実行時にpopenを使用して結果をフェッチしてみませんか。
拡張機能を書いてください:)
C++ 用の PHP 拡張ラッパー
#include "php.h"