php 5.3.2 - $ _get $ _post无效

-3 php apache post get localhost

我使用php和mysql支持在我的localhost上运行apache服务器.唯一的问题是,那$_GET并且$_POST根本不起作用.

这是我的html文件:

<html>
<body>
<form action="message.php" method="GET">
Enter your message here: <input type="text" name="msg" size="30">
<input type="submit" value="Send">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

这是我的message.php文件:

<?php
$input = $_GET('msg');
echo "$input";
?>
Run Code Online (Sandbox Code Playgroud)

如果我在我的html中的文本输入字段中键入"blablabla",它会将我重定向到[localhost] /message.php?msg=blablabla,这很好但是php给了我一个空页面.我检查了[localhost] /message.php?msg=blablabla的源代码,但它只有一个空部分和一个空部分.

我犯了什么错误或者这是一个错误吗?

Aur*_*osa 5

$_GET以错误的方式使用.$_GET是一个数组.所以你必须以这种方式使用它:

$_GET['msg'];
Run Code Online (Sandbox Code Playgroud)