dll
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; namespace Toledo { [ComVisible(true)] public class Scale { public string write() { return "hello world!"; } } }
已经强制签名、已经注册:
regasm Toledo.dll <回车> gacutil /I Toledo.dll <回车>
PHP.ini
[PHP_COM_DOTNET] extension=php_com_dotnet.dll
index.php
<?php $j = new COM("Toledo.Scale") or die("调用COM失败!"); $s = $j->write(); echo $s;
报错
立即学习“PHP免费学习笔记(深入)”;
Fatal error: in D:\xampp\htdocs\com\index.php on line 2
非常费解,求指点! -_-||
dll
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; namespace Toledo { [ComVisible(true)] public class Scale { public string write() { return "hello world!"; } } }
已经强制签名、已经注册:
regasm Toledo.dll <回车> gacutil /I Toledo.dll <回车>
PHP.ini
[PHP_COM_DOTNET] extension=php_com_dotnet.dll
index.php
<?php $j = new COM("Toledo.Scale") or die("调用COM失败!"); $s = $j->write(); echo $s;
报错
立即学习“PHP免费学习笔记(深入)”;
Fatal error: in D:\xampp\htdocs\com\index.php on line 2
非常费解,求指点! -_-||
建议封装到WCF中调用
http://www.cnblogs.com/tianbang/archive/2012/05/10/2494147.html
.dll文件缺失怎么办?.dll文件在哪下载?不用担心,这里为大家提供了所有的.dll文件下载,无论用户丢失的是什么.dll文件,在这里都能找到。用户保存后,在网盘搜索dll文件全称即可查找下载!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号