Converting php code to Symfony class -
i using simple php code activexpert send sms here intersting part
<?php if(isset($_post["submit1"])) { $_objsmsprotocolgsm = new com("activexperts.smsprotocolgsm"); ... } ?>
it working fine when tried insert controller in symfony error
attempted load class "com" namespace "pfe\siivtbundle\controller" in c:\program files (x86)\easyphp-devserver-14.1vc11\data\localweb\symfony2.5\src\pfe\siivtbundle\controller\siivtcontroller.php line 835. need "use" namespace?
while php code simple , doesnt include or require other files
error message self-explanatory. com
class doesn't exist in pfe\siivtbundle\controller
namespace (which current namespace in controller class).
try:
new \com("activexperts.smsprotocolgsm");
the backslash before classname means we're looking class in global namespace
Comments
Post a Comment