Insert PHP code?
20 posts
• Page 1 of 2 • 1, 2
Insert PHP code?Hi.
I'm trying to insert PHP Code within the source-code but it get's deleted right after switching back to normal mode. Is there any chance to insert such code? Thanks and Regards.
|
Re: Insert PHP code?You have to uncomment line
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; in fckconfig.js
|
Re: Insert PHP code?I already did this but the code just doesn't get executed.
Viewing the source-code, the PHP-Code is visible. Apparently, it just gets "printed" into the source but is not beeing executed. Example: I'm writing a normal text within FCKEditor and want to grab the current date.
How to do this? (I attatched the source-code viewed in Firefox so you can see what i mean...)
|
Re: Insert PHP code?...
Last edited by amaranth on Wed Mar 25, 2009 4:59 pm, edited 1 time in total.
|
Re: Insert PHP code?Is it not being executed within the editor or on the output-page?
|
Re: Insert PHP code?Neither within the editor nor on the output-page.
|
Re: Insert PHP code?Sorry for pushing - anybody got an idea?
|
Re: Insert PHP code?yeah, maybe you must choose the extension .php in place of .html or .htm or .asp
That shall work. your server must have php installed otherwise it wont work
|
Re: Insert PHP code?Hi,
I had the same problem. Do you use the "echo" command to print the website code? If yes, you should use "eval", but you should close the php tag first when you eval you website, otherwise you get an error because eval try to open a php tag but it isn't closed at that point. Error999
|
Re: Insert PHP code?Change the html extention to php, then enter your php code in view source eg.
and call the output through a url e.g.
However I haven't got the editor to read the file back for editing again.
|
20 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 8 guests