PHP没有在iFrame中运行

Hi I am trying to make a personal code playground... I am using Code Mirror to turn into looking like an IDE (I also plan to add features of an IDE later but...). My current code is basically..

HTML (index.html)

<html>
<head>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <script src="http://codemirror.net/lib/codemirror.js"></script>
    <link href="http://codemirror.net/lib/codemirror.css" rel="stylesheet" />
    <script src="http://codemirror.net/mode/htmlmixed/htmlmixed.js"></script>
    <script src="http://codemirror.net/mode/css/css.js"></script>
    <script src="http://codemirror.net/mode/javascript/javascript.js"></script>
</head>
<body>
<div class="codewindow">
        <form id="codePush" action="codePush.php" method="POST" target="codeResults">
            <textarea id="htmlWindow"></textarea>
            <textarea id="cssWindow"></textarea>
            <textarea id="jsWindow"></textarea>
            <input type="submit" />
        </form>
        <script class="code">
            var htmlCodeMirror = CodeMirror(function(elt) {
                htmlWindow.parentNode.replaceChild(elt, htmlWindow);
                }, {value: "<!-- HTML goes here -->",
                   lineNumbers: true,
                   mode: "text"});
        </script>
        <script class="code">
            var cssCodeMirror = CodeMirror(function(elt) {
                cssWindow.parentNode.replaceChild(elt, cssWindow);
                }, {value: "/* CSS goes here. */",
                   lineNumbers: true,
                   mode: "css"});
        </script>
        <script class="code">
            var jsCodeMirror = CodeMirror(function(elt) {
                jsWindow.parentNode.replaceChild(elt, jsWindow);
                }, {value: "// JavaScript goes here.",
                   lineNumbers: true,
                   mode: "javascript"});
        </script>
    </div>
    <div class="output">
        <iframe id="codeResults" name="codeResults" target="codePush.php" width="100%" height="100%" frameBorder="0.5" scrolling="yes"></iframe>
    </div>
</body>

PHP (codePush.php)

<!DOCTYPE html>
<html>
<head>
    <style>
        <?php
        echo $_GET['cssWindow'];
        ?>
    </style>
    <script type="text/javascript">
        <?php
        echo $_GET['jsWindow'];
        ?>
    </script>
</head>
<body>
    <?php
    echo $_GET['htmlWindow'];
    ?>
</body>
</html>

I have made sure the link to the iFrame works because when adding text to the PHP file in the body section it displays when submit is pressed.

I hope I have made it clear and would appreciate any help... Just for reference I am a bit of a NOoB when it comes to PHP

I'm not entriely sure what you're trying to achieve with all the code you provided, but here's a simplified version that will fix the main issue of the code not processing in codePush.php:

<div class="codewindow">
<form id="codePush" action="codePush.php" method="POST" target="codeResults">
    HTML:<textarea id="htmlWindow" name="htmlWindow"></textarea>
    CSS:<textarea id="cssWindow" name="cssWindow"></textarea>
    JS:<textarea id="jsWindow" name="jsWindow"></textarea>
    <input type="submit" />
</form>
</div>
<div class="output">
    <iframe id="codeResults" name="codeResults" target="codePush.php" width="100%" height="100%" frameBorder="0.5" scrolling="yes"></iframe>
</div>

CodePush.php

<!DOCTYPE html>
<html>
    <head>
        <style>
            <?php
            echo $_POST['cssWindow'];
            ?>
        </style>
        <script type="text/javascript">
        <?php
            echo $_POST['jsWindow'];
        ?>
        </script>
    </head>
    <body>
        <?php
        echo $_POST['htmlWindow'];
        ?>
    </body>
</html>

Note that CodePush.php uses 'POST' not 'GET' so that it is consistent with your form. You were also missing 'name' attributes on the textareas which is what is used in the post (not the ids). You might want to consider adding in some checks if the fields aren't complete to avoid errors etc.