Caching XML views
Hi guys, I'm currently creating RSS feeds using a separate layout with header(Content-Type: text/xml); inside of it, which all works fine and dandy. The problems occur when trying to push the code into my live environment which relies on caching due to heavy traffic. I am now getting unexpected T_STRING errors due to the ?xml in the cache file (I'm echo'ing this line via PHP in the view). Is there a solution for this problem other than disabling short tags in PHP? if I have to go this route then so be it but it's a large app and there is heavy use of short tags unfortunately. Many thanks, Nick J. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Caching XML views
If your on linux you can use this shell script to replace all short tags with full tags # script to replace short php tags ? with long one ?php for i in `find public_html -type f|grep -e \.php\|\.inc`; do echo $i; sed s/?/?php/ $i /tmp/$$ mv -f /tmp/$$ $i done # remove accidentally doubled ones for i in `find public_html -type f|grep -e \.php\|\.inc`; do echo $i; sed s/?phpphp/?php/ $i /tmp/$$ mv -f /tmp/$$ $i done # change the echo ones for i in `find public_html -type f|grep -e \.php\|\.inc`; do echo $i; sed s/?php echo /?php echo / $i /tmp/$$ mv -f /tmp/$$ $i done --- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---