Bonjour.
J'ai créé une dll simple en C# avec à l"intérieur une classe bateau.
Mon code PHPCode:
1
2
3
4
5
6
7
8
9
10
11
12 using System; using System.Collections.Generic; using System.Text; namespace toto { public class Class1 { public string test(){ return "ça fonctionne terrible"; } } }
Rien de méchant pour l'instant. De là, je génère une dll mais lorsque je veux utilisé cette dll depuis php via l'objet COM les embrouilles commence.Code:
1
2
3 <?php $obj = new COM("test_php"); ?>
et j'ai l'erreur suivante:Ma question c'est de savoir ou je place ma dll. /windows/ , windows/system32/Citation:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `test_php': Syntaxe incorrecte ' in c:\http\WWW\zorha\test.php5:2 Stack trace: #0 c:\http\WWW\zorha\test.php5(2): com->com('test_php') #1 {main} thrown in c:\http\WWW\zorha\test.php5 on line 2
Je suis un peut perdu.
avec ça sa fonctionne.
Code:
1
2 $excel = new COM("excel.application") or die("Unable to instanciate excel"); print "Loaded excel, version {$excel->Version}\n";
