PHP problem, I cant see php

General questions about CMSimple
Post Reply
rain-13

PHP problem, I cant see php

Post by rain-13 » Tue Mar 03, 2009 9:21 pm

When I paste PHP code in condent.htm, I wont see any effect, I dont see anything, I can only see PHP source sometimes.

I with with code:
<?php
print 'PHP not working with CMSimple Oo';
?>

I insert code by dreating Heading, then I download condent.htm ja paste code in right place, and then I upload it again

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: PHP problem, I cant see php

Post by Holger » Tue Mar 03, 2009 9:55 pm

The content.htm file is not a script file and will never be executed by php!
To run PHP in the content, you have to use CMSimple Scripting http://www.cmsimple.com/?Installer%27s_ ... _Scripting.

A code like yours must be placed in the template.


WBR
Holger

rain-13

Re: PHP problem, I cant see php

Post by rain-13 » Tue Mar 03, 2009 11:09 pm

It looks nice but I cant find download link for this. :(

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: PHP problem, I cant see php

Post by Holger » Tue Mar 03, 2009 11:11 pm

rain-13 wrote:It looks nice but I cant find download link for this. :(
:?:
It's a manual! You have to read what Peter wrote there. If you want to download it: right-click -> save as... ;)

Holger

rain-13

Re: PHP problem, I cant see php

Post by rain-13 » Wed Mar 04, 2009 7:09 pm

yep, now I got how to use it. but I cant get how I use php with it if in type php code there then it dont work.

Is there any commands include php file? or is it possible to modify cmsimple to allow php?

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: PHP problem, I cant see php

Post by mvwd » Sat Mar 07, 2009 4:56 pm

To use your own code within CMSimple-pages, you can use CMSimple-Scripting. That's the Link Holger posted before. Looks like:

Code: Select all

#CMSimple $myText=strtolower('tESt');  $output.=$myText; #
Insert you PHP-Code right inbetween #CMSimple and #.

If you want your code to manipulate some CMSimple-variables, you have to learn which variable holds which data. The most important is $output, which holds the content-text of the active page.
For a complete list of variables/functions used in CMSimple, take a look at: http://www.mv-web-design.de/?CMSimple:F ... Funktionen (German only).

If you want to include your own function permanently, place it in the function-file. It is loacated at ./cmsimple/functions.php

If this informations don't help, why don't you tell us which code you want to run?

mvwd.

Post Reply