Posted on: 05/07/08 11:19am
By: manowar
I have this in php, I am testing PHP in staticspage,
?>php
$text = 'hello word!';
echo $text;
?> // this is correct for php
but it does not print out anything. Staticpages.PHP' is checked and "execute PHP" is select.
But if I do this,
echo "Hello";
?>,<b>world</b>,
<?php
echo "how are you?";
?> //example from Documentation
it works, I do not understand, somebody can explain to me like inserted php in staticspage correctly, I thinking about many lines of PHP code.
?????
:banghead:
Re: Php in statics page
Posted on: 05/07/08 03:26pm
By: Dirk
Quote by: manowar?>php
$text = 'hello word!';
echo $text;
?> // this is correct for php
Not sure what you expect this to do. The ?> ends the section of PHP code, so everything after that would be printed out as-is.
As the documentation tries to explain: You're in "PHP mode" inside the static page. If all you want to have there is PHP code, you don't need any <?php or ?> tags.
bye, Dirk
Re: Php in statics page
Posted on: 05/08/08 10:58am
By: manowar
Not sure what you expect this to do. The ?> ends the section of PHP code, so everything after that would be printed out as-is.
I am mistaken in writing up this ?>php in this post. But it's not works to me.
Re: Php in statics page
Posted on: 05/08/08 01:18pm
By: jmucchiello
Your staticpage should look exactly like this.
Text Formatted Code
$text = 'hello word!';
echo $text;
Re: Php in statics page
Posted on: 10/05/08 01:32am
By: koalasoft
Quote by: manowarI have this in php, I am testing PHP in staticspage,
?>php
$text = 'hello word!';
echo $text;
?> // this is correct for php
but it does not print out anything. Staticpages.PHP' is checked and "execute PHP" is select.
But if I do this,
echo "Hello";
?>,<b>world</b>,
<?php
echo "how are you?";
?> //example from Documentation
it works, I do not understand, somebody can explain to me like inserted php in staticspage correctly, I thinking about many lines of PHP code.
?????
:banghead:
Verifica que el grupo de administradores de paginas estáticas tengan la opción de poder ejecutar código php, y que dentro de la pagina estática donde intentas efectuar tal código este seleccionando la opción de ejecutar codigo php y obviamente que tu código funcione correctamente.
Saludos !!