Hi all,
I like to create the application with AGI Programing.
In the PHP file I need to get the current DateTime of server. for get that in php I use this syntax ($date = new DateTime()) But when I use this my AGI program can’t run correctly.
In the external PHP file when I use that syntax easily I can get the system correct Date and Time…!!!
I have a question, we can’t use PHP syntax in the AGI programing whit PHP language?
This location of my file in var/lib/asterisk/agi-bin/Sample.php
david, thanks for your replay
Yes, this issue has been asterisk.
When I use this syntax ($date = date(‘Y-m-d’)) is work correctly. But when I use this syntax ($date = new DateTime()) is not work.
So I need to create a datetime variable in phpAGI.