Sublime Text 3 does not recognize commands in PHP

Asked

Viewed 4,342 times

2

I started using Sublime Text 3 after a while using Bluefish and came across a situation; the commands in PHP are not executed by my editor and, after a long search in Google and chat with some friends developers, I was told that a certain option should be activated so that Sublime understands PHP code. So much for two hours and I still can’t find.

Does anyone know where this option would be, if it actually exists, or my publisher who’s in trouble? Even, I have a friend who is not able to run Javascript in Sublime also.

  • 3

    "os comandos em PHP não são executados pelo meu editor" What does that mean? A text editor is used to edit text, it is expected that it does not execute anything.

2 answers

2

The sublime does not run php, not even Bluefish as I recall, what you can do is set the default php syntax that comes with the sublime, or download some that has ways to complete the functions. I recommend PHP Syntax Checker. To install just press Ctrl + Shift + P, after that type "Install package" and type the package name "PHP Syntax Checker" and ready, will be installed and can use. On the internet you can find other Packages that are very productive.

  • Okay, I put it wrong. I use Sublime to edit, but when I run it in the browser it simply doesn’t return the commands written in php, only in html. It returns "'php' is not recognized as an internal or external command, a program or a batch file"

  • Do you have Apache PHP installed? or if so, have you checked if the service is running? I don’t work a lot with php, but I know you have to install some specific programs to run a php code, and it has to be in a specific folder as well. The following is the installation link for Ubuntu (http://gilbertoalbino.com/como-instalar-php-7-no-ubuntu-via-apt-get/). The folder your project has to be in is var/www/html/project-name. E para windows (https://blog.schoolofnet.com/2015/04/comorinstalar-o-php-no-windows-do-jeito-certo-usar-o-servidor-embutido/)

  • And also make sure you have properly configured the environment variables in windows, because I think that’s what is causing your problem.

1

It does not run anything, it is a text editor. If you want to edit Syntax, just go to view >> Syntax >> PHP

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.