PHP VSCode에서 ExecutablePath 유효성 검사

Sheeraz Gul 2023년6월20일
PHP VSCode에서 ExecutablePath 유효성 검사

이 자습서에서는 VSCode에서 PHP 실행 파일 경로의 유효성을 검사하는 방법을 보여줍니다.

PHP VSCode에서 ExecutablePath 유효성 검사

VSCode에서 PHP로 작업할 때 일반적으로 다음 오류가 발생합니다.

It cannot validate since no PHP executable is set. Use the setting 'php.validate.executablePath' to configure the PHP executable.

VSCode에 PHP 실행 경로가 설정되어 있지 않기 때문입니다. 실행 경로의 유효성 검사는 간단한 작업이며 아래 지침에 따라 수행할 수 있습니다.

VSCode의 settings.json을 엽니다. settings.json 끝에 php.exe 경로와 함께 다음 줄을 추가합니다.

"php.validate.executablePath": "C:/php74/php.exe"

XAMPP를 사용하는 경우 PHP 경로는 다음과 같습니다.

"php.validate.executablePath": "C:/xampp/php/php.exe"

settings.json을 저장하고 종료합니다. 그것은 문제를 해결할 것입니다. settings.json을 찾을 수 없는 경우 VSCode에서 찾을 수도 있습니다.

  1. VSCode를 열고 파일 -> 기본 설정 -> 설정으로 이동합니다.

  2. 설정을 엽니다. 사용자 설정 탭이 열립니다.

  3. 사용자 설정 페이지의 오른쪽에 여기에 설정을 지정하여 기본 설정을 덮어씁니다가 있습니다.

  4. 해당 옵션에서 다음 코드를 PHP 경로와 함께 붙여넣습니다.

    {
    "php.validate.executablePath":
    "C:/php74/php.exe"
    }
    

위의 모든 단계를 완료하셨습니까? 저장하면 작업할 준비가 된 것입니다.

작가: Sheeraz Gul
Sheeraz Gul avatar Sheeraz Gul avatar

Sheeraz is a Doctorate fellow in Computer Science at Northwestern Polytechnical University, Xian, China. He has 7 years of Software Development experience in AI, Web, Database, and Desktop technologies. He writes tutorials in Java, PHP, Python, GoLang, R, etc., to help beginners learn the field of Computer Science.

LinkedIn Facebook

관련 문장 - PHP Error