Use of PHP in v2.0?

bart10001

No avatar

2008-04-02 18:06

Hello,

Im trying to use php on my site. I use v2.0
I'm already looking for two days :( .

Can someone tell me how i can use php?

Thank you

» Quick.Cms v2.x

bart10001

No avatar

2008-04-03 00:40

Someone?

merci

No avatar

2008-04-03 08:55

bart10001 - have you read this: http://www.opensolution.org/Quick.Cms/docs/?id=tips#how_to_execute_php_code_in_templates

bart10001

No avatar

2008-04-03 10:26

Yes i know i already read that.
I changed in general.php “$config[’embed_php’]” to
$config['embed_php'] = true;

But then i dont get it. Must i edit every file in template/
also .tpl files? and where do i need to insert this in the files. <?php echo phpinfo(); ?>

thanks btw for the awnser

cgan

Avatar: cgan

2008-04-03 18:20

bart - you just insert the code for example<?php echo phpinfo(); ?> where you want it to be in the template you want. E.g copy "pages_default.tpl" and change the name to "your_pages_default.tpl".
Add the code <?php echo phpinfo(); ?>where you want it to be. Then you choose that template to be used on your site. You choose that template in admin/pages/yourpagename
To the right you have the tabs "Options" "View" "Files" "SEO".
Click on "View" and find the Template "your_pages_default.tpl". There you choose your template to be used.

cgan

bart10001

No avatar

2008-04-03 19:44

Thanks for the reply. But its not working.

I copy pages_default.tpl to my computer. I add there my code <?PHP include ("123tijdschrift.php");?> . I upload this file with the name 'your_pages_default.tpl
I made a new page in the admin and I choose template 'your_pages_default.tpl
But its not working.

bart

cgan

Avatar: cgan

2008-04-03 20:56

Check if it's the right path to your file "123tijdschrift.php"
I script this way: <?php include 'mydir/myfile.php'; ?>

cgan

bart10001

No avatar

2008-04-03 21:56

Its not working :(
Do I something wrong?

bart

bart10001

No avatar

2008-04-03 22:13

I turns me crazy :(

bart

bart10001

No avatar

2008-04-03 22:40

YEAHHHHHHHHHHHHH IT WORKS!!!

Thanks alot for helping :)

bart

Back to top
about us | contact