XAMPP - PHP停止工作后被复制


XAMPP - PHP Stopped Working After Being Copied

我使用XAMPP在phpMyAdmin中创建了一个具有多个表的网站,多个页面和文件(html, php, jquery, javascript, css)。

我将所有文件保存在XAMPP文件夹中的htdocs文件夹中,并创建了一个.htaccess文件:

RemoveHandler .html .htm

AddType application/x-httpd-php .html .htm

和其中的其他行(不以任何方式干扰这两行)。我试过有和没有这两行。

我是XAMPP的新手。

在为网站创建所有文件和页面时,一切都运行得很完美。我完成了网站。然而,一旦我将文件(其中包含XAMPP和我所有的网站文件)复制到我们的服务器,PHP将无法运行。它不会在服务器上运行,也不会在存储文件的计算机上运行。

HTML文件注释掉了一些PHP,其他的PHP被写入网页作为内容PHP文件显示所有PHP代码

PHP在我复制包含XAMPP

的文件夹之前运行良好

我用了关闭文件。

…当我想把我的项目从我的笔记本电脑复制到另一台电脑时,我只复制我保存项目的目录....我的方法是在我要复制的电脑上安装一个新的示例程序,然后我去…

C:/xampp/htdocs/(find your project directory and copy the entire directory)

将相同的规则粘贴到另一台计算机的新示例中

C:/xampp/htdocs/(here you paste your work)

然后您可以从xampp导出您的表,并将文件加载到新的xampp…为了尝试你的安装,让我们把xampp一些测试的东西

将其复制到一个新项目中并创建一个文件作为索引

复制这个

<div>
<h3 align="center"><strong align="center">Bienvenido</strong></h3>
<table align="left" width="50px">
    <tr>
        <td width="20px">
            <h3 align="right" style="font-size:18px"><strong align="center">Bienvenido 1</strong></h3>
        </td>
        <td>
            <h3 align="left" style="font-size:18px">hola 1</h3>
        </td>
    </tr>
    <tr>
        <td width="20px">
            <h3 align="right" style="font-size:18px"><strong align="center">Bienvenido 2</strong></h3>
        </td>
        <td>
            <h3 align="left" style="font-size:18px">Hola 2</h3>
        </td>
    </tr>   
</table> 
<?php echo "hoja de pruebaaaaaa";?>

相关文章: