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.
这可以做到吗?
不知道 Cython.so扩展是否可以从 php 脚本动态加载,还是需要任何额外的管理?
.so
最简洁的答案是不。Cython 扩展使用 Python C API,因此不能直接从 PHP 加载和调用。它们通常会将 PyObject 结构作为参数(Python 对象)接受并返回。您需要一个 Python <-> PHP 绑定来加载 .so 并进行对象转换。