Hello,
I have been trying to include a php file via the editor with no success,..
I have uncommented the line in fckconfig.js:
The code now does remain in the source when viewing the text via fckeditor, but nothing is happening, when I view the source of the page in the browser, I am seeing the actual php line:
I tried to escape some characters, but its get printed with them
Is there something I am missing? any help would be great.
I have been trying to include a php file via the editor with no success,..
I have uncommented the line in fckconfig.js:
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
The code now does remain in the source when viewing the text via fckeditor, but nothing is happening, when I view the source of the page in the browser, I am seeing the actual php line:
<? include($_SERVER['DOCUMENT_ROOT']."/scripts/links/links.php"); ?>
I tried to escape some characters, but its get printed with them
<? include($_SERVER[\'DOCUMENT_ROOT\'].\"/scripts/links/links.php\"); ?>
Is there something I am missing? any help would be great.
Re: php include possible?
Re: php include possible?
I guess that you are thinking about eval() function. This should do what you need. But be careful with that...
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: php include possible?
However it did not do the trick:
what I am doing is storing the php string, with other regular text/html in a database, so that hopefully when I call the page this particular php script can execute and display its content, it works fine when I added it directly to the page but not when I include it with fckeditor. When I browse the source of the page, the php is in the source, but only printed out as I shown above it does not parse/eval anything.
Re: php include possible? [SOLVED]
Thanks for the help.