define constant does not work
2 posts
• Page 1 of 1
define constant does not work
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
If I gonna use it like
Im using the latest version of VS 12 Professional and the latest version from PHPTools
Where is my problem?
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'
- Code: Select all
TemplatePathmyTemplateFolder
- 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?
- loony
- Posts: 1
- Joined: August 12th, 2017, 9:23 am
Re: define constant does not work
Hi, I tried to do:
and it works perfectly fine. PHP Tools only uses official PHP. If your output is different than
- 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
, you don't have this constant defined before evaluation and then the output would be like yourssome/path/to/the/template/myTemplateFolder
- Code: Select all
TemplatePathmyTemplateFolder
Maroš Beňo
-
maros.beno - Posts: 62
- Joined: October 12th, 2016, 12:11 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 99 guests