본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

Installed PHP, and it works on command line, but Firefox won't execute "test.php" Is there a setting I missed?

  • 2 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: DisneyWizard

more options

How do I tell Firefox that, or where, PHP exists, and to execute script? I installed PHP 5.3 as per msVista (basic) instructions on php.org to C:\Program Files\PHP\ and it works if I open cmd on the command line : C:\Program Files\PHP>php -a Interactive mode enabled ^Z and scripts in tags work properly.

However opening a page or file such as test.php containing valid script with Firefox 23.0.1 fails to interpret the script and just displays the uninterpreted source code as if it were text. I found that because C:\Program Files\PHP\ contains a space in the pathname the path needs to be enclosed within quotes "C:\Program Files\PHP\" [smacks forhead: shoulda installed to C:\PHP\ ] to be recognized. Is that the problem, and where do I make the change?

How do I tell Firefox that, or where, PHP exists, and to execute <?php php> script? I installed PHP 5.3 as per msVista (basic) instructions on php.org to C:\Program Files\PHP\ and it works if I open cmd on the command line : C:\Program Files\PHP>php -a Interactive mode enabled ^Z and scripts in <?php php> tags work properly. However opening a page or file such as test.php containing valid script with Firefox 23.0.1 fails to interpret the script and just displays the uninterpreted source code as if it were text. I found that because C:\Program Files\PHP\ contains a space in the pathname the path needs to be enclosed within quotes "C:\Program Files\PHP\" [smacks forhead: shoulda installed to C:\PHP\ ] to be recognized. Is that the problem, and where do I make the change?

선택된 해결법

Did your PHP installation package include a webserver (e.g., WAMP)? Generally speaking, the webserver will set up and take over port 80 and you can access your "site" using:

http://localhost/

Sometimes you may prefer to set up on a different port, for example, 8080, and then you would use:

http://localhost:8080/

As far as I know, there's no way to have Firefox stand in for a webserver and process .php files through the PHP interpreter itself. Of course, there might be an add-on for that...

문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (2)

more options

선택된 해결법

Did your PHP installation package include a webserver (e.g., WAMP)? Generally speaking, the webserver will set up and take over port 80 and you can access your "site" using:

http://localhost/

Sometimes you may prefer to set up on a different port, for example, 8080, and then you would use:

http://localhost:8080/

As far as I know, there's no way to have Firefox stand in for a webserver and process .php files through the PHP interpreter itself. Of course, there might be an add-on for that...

more options

Missing WAMP ("Windows, Apache, MySQL, and PHP") WebServer. Sorry, not a Firefox issue. My mistake. Thanks for the solution.