我的php脚本正在使用本地主机,但是在线上传后它显示出一个空白页面。安装在本地主机上的版本php重定向
PHP 5.2.6 PHP 生产环境5.1.4版
<?php
define('INCLUDE_CHECK',true);
require 'connect.php';
session_start();
php require 'function.php';
?>
<html>
<head>
</head>
<body>
session_name('smsapp');
session_start();
$fname = mysql_real_escape_string($_POST['fname']);
$name = mysql_real_escape_string($_POST['name']);
$email =mysql_real_escape_string($_POST['email']);
$phone = mysql_real_escape_string($_POST['phone']);
$pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
$str = "INSERT INTO members(fname, name, pass, phone, email, regIP, dt, level)
VALUES(
'".$fname."',
'".$name."',
'".md5($pass)."',
'".$phone."',
'".$email."',
'".$_SERVER['REMOTE_ADDR']."',
1,
NOW()
)" ;
mysql_query($str);
if(mysql_affected_rows($link) == 1 &&
($_SESSION['security_code'] == $_POST['security_code']))
{
echo "Password will be sent to you by sms.";
$url = "http://sms.kohlihosting.com/sendsmsv2.asp?
user=username&
password=12345&
sender=kohli&
text=Your+password" . $pass . "&
PhoneNumber=".$phone;
$homepage = file_get_contents($url) ;
}
else if(!($_SESSION['security_code'] == $_POST['security_code']))
{
echo "Please Input correct letters ";
}
else
{
echo "Not registered";
}
?>
安装这是一个正在本地主机,但不能上网的代码。
此代码非常难以阅读您在本文中格式化的方式。 – Roman 2009-12-10 06:15:37
另外,您的第二个<?php开头标签在哪里?看起来你需要在
之后。这并不能解释为什么它可以在本地主机上运行。 – Roman 2009-12-10 06:24:43对不起!我的编码wa太差了 – nicky 2009-12-10 06:24:53