PHP not working on FirstSpirit
Author: milovan_bekic
Publication Date: 12/7/2017 9:31
I have PHP file for form processing but my FristSpirit server doesn't recognize PHP. Can you help me?
The PHP is not executed, I will attach image.
-
Author: Mchrobok - 12/7/2017 11:09
Have you changed the file extention to .php .
Isn't the PHP Start Tag <?php
0 -
Author: milovan_bekic - 12/7/2017 13:02
Yes extension was changed, that in picture is output in browser when select inspect page.
Code looks like this:
<?php
echo 'Firstname'. $_POST["template-contactform-firstname"];
echo 'Lastname' . $POST['template-contactform-lastname'];
echo 'Email' . $POST['template-contactform-email'];
echo 'Company' . $POST['template-contactform-company'];
echo 'Country' . $POST['template-contactform-country'];
echo 'Phone' . $POST['template-contactform-phone'];
echo 'Message: ' . $_POST["template-contactform-message"];?>
0 -
Author: brueder - 12/19/2017 13:52
Hi Milovan,
the problem here is "htmlMode". FirstSpirit sees XMLish tags and wants to inject stuff for the preview, which fails sometimes.
See https://www.e-spirit.com/odfs52/template-develo/debugging/where-is-error/template-inspec/ for more information (Documentation FirstSpirit™ tells you the login credentials)
You need to deactive "htmlMode" for the tags, like this:
$CMS_SET(#global.htmlMode, false)$<?php$CMS_SET(#global.htmlMode, true)$
foobar
$CMS_SET(#global.htmlMode, false)$?>$CMS_SET(#global.htmlMode, true)$
In case you still get the commented-out version, caching is happening. You need to force-refresh, or simply wait a bit.
Cheers,
Lena
0 -
Author: sebastianc - 1/10/2018 9:41
Hello Milovan,
is this still an open question? Do you need further help or did the given replies already help you?
If so it would be great if you mark the "correct answer".
Best regards
Sebastian0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare