这段PHP代码无法上传,是什么错误,望高手解答,不胜感激。我不懂PHP,希望给出修改后的答案。

xiaojie0817 2010-04-04 05:08:03
<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.google.com/ncr" );
} else {
echo 'Hello Opera Mini Server! Fuck GFW!';
}
} else {
echo 'cURL is not enabled.';
}
} else {
$curlInterface = curl_init();
$headers[] = 'Connection: Keep-Alive';
$headers[] = 'content-type: application/xml';
$headers[] = 'User-Agent: Java0';
curl_setopt_array($curlInterface, array(
CURLOPT_URL => 'http://server4.operamini.com',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => @file_get_contents('php://input'))
);
$result = curl_exec($curlInterface);
curl_close($curlInterface);
header('Content-Type: application/octet-stream');
header('Cache-Control: priavte, no-cache');
echo $result;
}
?>
...全文
45 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaojie0817 2010-04-04
  • 打赏
  • 举报
回复
上传后会出现下面的东西,看不懂:



您的 SQL 查询可能有错。如果可能的话,以下会列出 MySQL 服务器的错误输出,这可能对您解决问题有一定的帮助。

ERROR: 未知的标点符号字符串 @ 1
STR: <?
SQL: <?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );


SQL 查询:

<?php if ($_SERVER['REQUEST_METHOD'] == 'GET') { if (function_exists("curl_init")) { if (!$_GET["test"] != null) { header( "HTTP/1.1 301 Moved Permanently" );

MySQL 返回:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_in' at line 1
LuciferStar 2010-04-04
  • 打赏
  • 举报
回复
if (!$_GET["test"] != null)
很奇怪。
通过GET方式发过来的URL参数test取反后再判断是否不等于NULL
???
pandaidea 2010-04-04
  • 打赏
  • 举报
回复
是什么错误。。。你总要给个错误提示什么的吧???

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧