fuelphp

HTML tags not being rendered

佐手、 提交于 2019-12-01 05:47:41
问题 I'm building a simple blog system with FuelPHP and TinyMCE editor. When I format my text in the TinyMCE (or CKEditor, doesn't matter) and save it in my database everything is OK. However when I print the text back, surprisingly, my browser won't render the html tags and displays them as plain text! I have checked and I don't have any kind of CDATA in the page, that might cause the issue. Here is how it renders: However, when inspecting the issue with FireBug, I noticed a lot of spaces before

How to check if a constant exists in PHP

二次信任 提交于 2019-11-30 07:48:38
So I'm using a PHP framework called fuelphp , and I have this page that is an HTML file, so I can't use PHP in it. I have another file that has a top bar in it, which my HTML file will call through ajax. How do I check if a constant exists in PHP? I want to check for the the fuelphp framework file locations. These are the constants I need to check for (actually, I only have to check one of them): define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR); define('APPPATH', realpath(__DIR__.'/fuel/app/').DIRECTORY_SEPARATOR); define('PKGPATH', realpath(__DIR__.'/fuel/packages/').DIRECTORY_SEPARATOR);