homepage Welcome to WebmasterWorld Guest from 107.22.45.61
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP code within CMS
Am I missing something?
Winters




msg:1266903
 7:48 pm on Jan 20, 2005 (gmt 0)

I have been looking into using a CMS to help reduce my workload some. One thing I don't really seem to understand about most CMS is if they are able to render/execute php.

For example when I make a new piece of content (or article, or page, or whatever the CMS calls it), I can add in my own HTML formatting and stuff, but when I try to add in php code it just spits it out as raw text.

The only CMS that I've found (that is free and open source anyway) that has an option to render a page with php code on it is Drupal. Am I right in assuming that the other CMS's simply can't/don't do this?

 

mincklerstraat




msg:1266904
 8:19 pm on Jan 20, 2005 (gmt 0)

Usually a CMS will take what you input via a browser (where you're putting your HTML formatting and stuff, I presume) and save it into a database - and then later output the stuff it gets from the database. It outputs this content, it doesn't parse it, or execute it.

If you want to add your php code, you need to do this in the php files themselves. Most often, basic type php you want to add will go in the 'template', the 'style', or the 'theme'. Watch out for templates - not all of them allow php input.

This is all for some very good reasons - the basics of security in separation of coding and content, and sometimes the separation of code and design.

Some CMS's will allow you to add, via the browser, snippets of php which will be plopped somewhere on the page (using the php function eval()). This is frequently a bit of a gimmick, and not such a good idea security-wise; unless you trust the programmers implicitly, it's best to stay away from this kind of modules / blocks.

gb76




msg:1266905
 3:34 pm on Jan 28, 2005 (gmt 0)

Some CMS do have a wrapper : may be useful for you?
(just a suggestion, me not a guru).
gb.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved