Answer the question
In order to leave comments, you need to log in
How to solve Use of undefined constant php - assumed 'php' error?
Hello.
--
Faced with a mysterious phenomenon:
Prehistory.
We decided to transfer the site from virtual hosting to VDS, Linux, Apache / 2.4.18 (Ubuntu) is installed there.
The site fits on the php 7.0.3 version
. So, in the controller, from all designs by type:
return $this->render($this->module->getCustomView('login'), [
'model' => $model,
]);
''
one to one, where the error did not come out on the pages, and I want to figure out what it really was? Answer the question
In order to leave comments, you need to log in
Make sure that the opening <?php tag on the specified line is separated from the following code by a space.
For the future, to all those who code in the browser in the code editor.
If you use code editors on hosting, or use ISP Manager
After the first save, it will seem that you have saved the code, the next time after opening, you can find out that the code editor decided to stick everything in one line.
Moreover, ISP Manager has a bug of losing closing brackets, curly braces and other things like that. Again, the syntax error is revealed after closing the page with the code, and when you open it again, the syntax highlighting can move out.
Therefore, if you do not want such problems, try not to program in the browser, in the code editor. As I understand it, this is a bug of the same library, which is used everywhere where there are code editors and syntax highlighting. Use special programs or IDE to avoid code deformation after reupload.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question