included PHP does not work unless HTML text is present
When I include PHP, it does not work unless I add some HTML text right before the PHP code section:
hi<br /> <!--#passthrough<?php include_once $_SERVER['ATS_CORE_PHP_LIB_PATH'].'/web/thoracic/committee_detail_inc.php'?>#passthrough-->
If I remove the text 'hi', the PHP will not run.
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Tim on 11 Feb, 2015 09:57 PM
Hi,
Can you tell me which version of the software you are using?
Thanks
2 Posted by Michael Clayton on 12 Feb, 2015 03:00 PM
Version 7.12.3
3 Posted by Wing Ming Chan on 12 Feb, 2015 03:59 PM
Hi,
I always put an empty div element before the code.
Wing
Support Staff 4 Posted by Tim on 13 Feb, 2015 09:12 PM
My guess is that you may be using Firefox. Can you confirm? I tried this locally and didn't have any issues in Chrome, but when I tried Firefox, I did get the additional
<br />
tag added before the content. This appears to be an issue with TinyMCE as the problem occurs immediately after clicking Insert (prior to submitting the Page). For kicks, I went to the TinyMCE demo page and while that is a newer version of the editor, it still has similar behavior (although in this case it adds<p> </p>
as opposed to<br />
.Since we don't have too much control over this at this point in time, you could potentially workaround this by doing one of the following:
<div>
element before the code (as Wing suggested above)I hope this helps. Let me know if you have any additional questions.
Thanks
Tim closed this discussion on 17 Apr, 2015 06:55 PM.