Page 1 of 1

define constant does not work

PostPosted: August 12th, 2017, 9:35 am
by loony
so I have an easy question.

In the php code of the shop there are a lot of constant who are defined.
My problem is now that the constant are not recogniced as a string

for example

Code: Select all
define('TemplatePath', 'some/path/to/the/template/');


If I gonna use it like
Code: Select all
TemplatePath . 'myTemplateFolder'
the URL would look like that
Code: Select all
TemplatePathmyTemplateFolder
instead of
Code: Select all
some/path/to/the/template/myTemplateFolder


Im using the latest version of VS 12 Professional and the latest version from PHPTools

Where is my problem? :D

Re: define constant does not work

PostPosted: August 17th, 2017, 9:15 am
by maros.beno
Hi, I tried to do:
Code: Select all
<?php
define('TemplatePath', 'some/path/to/the/template/');
echo TemplatePath . 'myTemplateFolder';

and it works perfectly fine. PHP Tools only uses official PHP. If your output is different than
some/path/to/the/template/myTemplateFolder
, you don't have this constant defined before evaluation and then the output would be like yours
Code: Select all
TemplatePathmyTemplateFolder