0

我使用的 URL 是:http://example.org/codecabana/runCode.php?code=%23include%20%3Cstdio.h%3E%0Aint%20main(void)%20%7B%0Aprintf(%22Code%20Cabana!%22)%3B%0Areturn%200%3B%0A%7D&lang=C
问题是,它似乎被替换"\. 我的 PHP 脚本是:

<?php
include "sl.php";
$code = $_GET['code'];
$lang = $_GET['lang'];

try {
$app = new slApp( $plaintext );
$result = $app -> run( $code , $lang ); //Pass the result of the request, as an array, to $result
echo $result['output'],"{BREAK}";
echo $result['compiler_errors'];
echo $code;
}catch( Exception $e ) {

    echo $e -> getMessage(), "{BREAK}", "An error has occurred! CODE: " , $code , "Lang: " , $lang;

}
?>
4

1 回答 1

-1

php.ini您可以从服务器上的文件中关闭 magic_quotes 。

您可以phpinfo()从 PHP 脚本运行以显示当前的 php 设置。

于 2012-09-22T21:58:11.567 回答