Hello
can you show a small piece of vxml code that contains some php
for example
<prompt>
<?php echo "these words come from php"; ?>
</prompt>
does not do anything in my developer account.
Yours Sincerely
John
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
inline php
inline php
John Brohan National Instruments LabVIEW expert in Montreal
Traders Micro "We connect all sorts of things to computers"
telemedicine applications
www.woundfollowup.com
Traders Micro "We connect all sorts of things to computers"
telemedicine applications
www.woundfollowup.com
IVR example that uses inline php
Hi,
Here is a small IVR example that uses inline php. Note the php written in the <var> tags:
Hope this helps.
Regards,
Plum Support
Here is a small IVR example that uses inline php. Note the php written in the <var> tags:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
$customerid = 1000;
$age = 15;
?>
<vxml version="2.0">
<form>
<var name="customerid" expr="'<?php echo($customerid)?>'"/>
<var name="age" expr="'<?php echo($age)?>'"/>
<block>
<prompt> Your customer identification number is <value expr="customerid"/>. </prompt>
<prompt> Your age is <value expr="age"/>. </prompt>
</block>
</form>
</vxml>
Regards,
Plum Support
Last edited by support on Wed Jan 13, 2010 12:24 pm, edited 3 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Hi
I appreciate the rapid turnaround.
I pasted the proposed text into a scratchpad and tried to validate it...
Validation Results:
Fatal Error at line 3, char 30
Message: Invalid document structure
scanFirst() failed
Sorry, I'm really new to Vxml. In regular HTML you can say <?php echo "this should print"; ?> and it gets inserted into the HTML stream to the browser.
Does it work the same way here?
Yours Sincerely
John
I appreciate the rapid turnaround.
I pasted the proposed text into a scratchpad and tried to validate it...
Validation Results:
Fatal Error at line 3, char 30
Message: Invalid document structure
scanFirst() failed
Sorry, I'm really new to Vxml. In regular HTML you can say <?php echo "this should print"; ?> and it gets inserted into the HTML stream to the browser.
Does it work the same way here?
Yours Sincerely
John
John Brohan National Instruments LabVIEW expert in Montreal
Traders Micro "We connect all sorts of things to computers"
telemedicine applications
www.woundfollowup.com
Traders Micro "We connect all sorts of things to computers"
telemedicine applications
www.woundfollowup.com
IVR system clarification
Hi,
Yes, it does work the same way in VoiceXML as it does in HTML. However, in order to execute PHP documents you will need your own PHP server. The scratchpads are only meant to contain static VoiceXML, any PHP placed in them will not be executed. Any PHP you put in a scratchpad will just be read as VoiceXML and will cause IVR validation errors.
Regards,
Plum Support
Yes, it does work the same way in VoiceXML as it does in HTML. However, in order to execute PHP documents you will need your own PHP server. The scratchpads are only meant to contain static VoiceXML, any PHP placed in them will not be executed. Any PHP you put in a scratchpad will just be read as VoiceXML and will cause IVR validation errors.
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com