問題描述
我的計算機上安裝了 Joomla,但最近一直在編寫與 Joomla 管理的站點無關的 php 文件.出于某種原因,當我嘗試使用 xampp 在網絡瀏覽器中打開這些 php 文件時(注意:Joomla 也在使用 xampp),瀏覽器不會將標簽中的代碼作為 php 代碼處理.
I have Joomla installed in my computer, but recently have been writing php files that aren't related to the Joomla-managed site. For some reason, when I try to open those php files in the web browser using xampp (note: Joomla also is using xampp), the browser doesn't process the code w/in the tags as php code.
例如,在網頁瀏覽器中打開一個基本頁面(標題為test"的頁面,除body標簽外沒有其他內容)并轉到源代碼后,在源代碼中顯示以下內容:
For example, after opening a basic page (a page with title "test", no content except in the body tags) in the web browser and going to the source code, the following is shows up in the source code:
<body>
<?php echo "hello"; ?>
</body>
而不是 HTML 轉換.(即只是你好")
instead of the HTML conversion. (i.e. just "hello")
有人知道這里發生了什么嗎?
Does anyone have an idea about what's going on here?
謝謝.
推薦答案
這可能是因為您的 apache 中沒有加載 PHP 模塊.確保它已啟用
It's probably because PHP module isn't loaded in your apache. Be sure it is enabled
這篇關于Web 瀏覽器未將 PHP 代碼作為 PHP 代碼處理的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!