2010-10-15 512 views
1

好的,所以我一直在編寫PHP代碼一段時間,理解它很好,但這讓我難住。HTML表單POST到PHP腳本不工作

// PHP文件

$country = $_POST['country']; 
$state_province = $_POST['state_province']; 
$postalcode = $_POST['postalcode']; 
$productid = $_POST['productid']; 
$quantity = $_POST['quantity']; 
echo $country; 
echo 'Script is fine'; 

// HTML文件

<form id="quick-quote-form" class="jquery" name='quick-quote-form' action='php/quick-quote.php' method='POST'> 

     <label for="country">Country</label> 

      <select name="country" id="country"> 
       <option selected="" value="">-- Select a Country --</option> 

       <option value="Argentina">Argentina</option> 

       <option value="Australia">Australia</option> 
      </select><br /> 

     <span class="state"> 

     <label for="state">State</label> 

      <select name="state_province" id="state_province"> 
       <option value="">-- Select a State --</option> 

       <option value="AL">Alabama</option> 

       <option value="AK">Alaska</option> 
       <option value="AZ">Arizona</option> 

      </select> 
      </span><br /> 

     <label for="postalcode">Postal Code</label><input type="text" name="postalcode" id="postalcode" placeholder="Postal Code" required><br /> 

     <label for="quantity">Quantity</label><input type="text" name="quantity" id="quantity"><br /> 

     <input name="productid" id="productid" type="hidden" value="xxxxx"> 

     <input type="submit" value="Go"> 

    </form> 

當我發佈此,國家var和其他任何變量的問世空。我只是交換主機,它似乎已停止工作。是否有某種主機設置可能會阻止此功能運行,或者是否存在我單純的簡單代碼出現明顯錯誤?

當我使用AJAX提交時,Firebug顯示發佈的值很好,但沒有成功響應。

有人請證明我錯了,或給我在我的CPanel魔術開關,使它更好!

謝謝!

編輯:phpinfo();返回

PHP Version 5.2.14 

System Linux mole.arvixe.com 2.6.18-294.8.1.el5.lve0.7.33.1 #1 SMP Sat Sep 18 17:12:09 EEST 2010 x86_64 
Build Date Aug 3 2010 10:12:11 
Configure Command './configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-fastcgi' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--enable-wddx' '--prefix=/usr' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=/usr' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr' 
Server API CGI/FastCGI 
Virtual Directory Support disabled 
Configuration File (php.ini) Path /usr/lib 
Loaded Configuration File /home/davekiss/php.ini 
Scan this dir for additional .ini files (none) 
additional .ini files parsed (none) 
PHP API 20041225 
PHP Extension 20060613 
Zend Extension 220060519 
Debug Build no 
Thread Safety disabled 
Zend Memory Manager enabled 
IPv6 Support enabled 
Registered PHP Streams https, ftps, compress.zlib, php, file, data, http, ftp 
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls 
Registered Stream Filters zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed 

This program makes use of the Zend Scripting Language Engine: 
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies 
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and 
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies 

PHP Credits 
Configuration 
PHP Core 
Directive Local Value Master Value 
allow_call_time_pass_reference On On 
allow_url_fopen On On 
allow_url_include Off Off 
always_populate_raw_post_data Off Off 
arg_separator.input & & 
arg_separator.output & & 
asp_tags Off Off 
auto_append_file no value no value 
auto_globals_jit On On 
auto_prepend_file no value no value 
browscap no value no value 
default_charset no value no value 
default_mimetype text/html text/html 
define_syslog_variables Off Off 
disable_classes no value no value 
disable_functions no value no value 
display_errors On On 
display_startup_errors Off Off 
doc_root no value no value 
docref_ext no value no value 
docref_root no value no value 
enable_dl On On 
error_append_string no value no value 
error_log error_log error_log 
error_prepend_string no value no value 
error_reporting 6135 6135 
expose_php On On 
extension_dir /usr/local/lib/php/extensions/no-debug-non-zts-20060613 /usr/local/lib/php/extensions/no-debug-non-zts-20060613 
file_uploads On On 
highlight.bg #FFFFFF #FFFFFF 
highlight.comment #FF8000 #FF8000 
highlight.default #0000BB #0000BB 
highlight.html #000000 #000000 
highlight.keyword #007700 #007700 
highlight.string #DD0000 #DD0000 
html_errors On On 
ignore_repeated_errors Off Off 
ignore_repeated_source Off Off 
ignore_user_abort Off Off 
implicit_flush Off Off 
include_path .:/usr/lib/php:/usr/local/lib/php .:/usr/lib/php:/usr/local/lib/php 
log_errors On On 
log_errors_max_len 1024 1024 
magic_quotes_gpc On On 
magic_quotes_runtime Off Off 
magic_quotes_sybase Off Off 
mail.force_extra_parameters no value no value 
max_execution_time 0 0 
max_file_uploads 20 20 
max_input_nesting_level 64 64 
max_input_time 600 600 
memory_limit 256M 256M 
open_basedir no value no value 
output_buffering no value no value 
output_handler no value no value 
post_max_size 3000M 3000M 
precision 12 12 
realpath_cache_size 16K 16K 
realpath_cache_ttl 120 120 
register_argc_argv On On 
register_globals Off Off 
register_long_arrays On On 
report_memleaks On On 
report_zend_debug On On 
safe_mode Off Off 
safe_mode_exec_dir no value no value 
safe_mode_gid Off Off 
safe_mode_include_dir no value no value 
sendmail_from no value no value 
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i 
serialize_precision 100 100 
short_open_tag On On 
SMTP localhost localhost 
smtp_port 25 25 
sql.safe_mode Off Off 
track_errors Off Off 
unserialize_callback_func no value no value 
upload_max_filesize 3000M 3000M 
upload_tmp_dir no value no value 
user_dir no value no value 
variables_order EGPCS EGPCS 
xmlrpc_error_number 0 0 
xmlrpc_errors Off Off 
y2k_compliance On On 
zend.ze1_compatibility_mode Off Off 

bcmath 
BCMath support enabled 

calendar 
Calendar support enabled 

cgi-fcgi 
Directive Local Value Master Value 
cgi.check_shebang_line 1 1 
cgi.fix_pathinfo 1 1 
cgi.nph 0 0 
cgi.rfc2616_headers 0 0 
fastcgi.logging 1 1 

ctype 
ctype functions enabled 

curl 
cURL support enabled 
cURL Information libcurl/7.21.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 

date 
date/time support enabled 
"Olson" Timezone Database Version 2010.9 
Timezone Database internal 
Default timezone America/Detroit 

Directive Local Value Master Value 
date.default_latitude 31.7667 31.7667 
date.default_longitude 35.2333 35.2333 
date.sunrise_zenith 90.583333 90.583333 
date.sunset_zenith 90.583333 90.583333 
date.timezone America/Detroit America/Detroit 

dom 
DOM/XML enabled 
DOM/XML API Version 20031129 
libxml Version 2.7.6 
HTML Support enabled 
XPath Support enabled 
XPointer Support enabled 
Schema Support enabled 
RelaxNG Support enabled 

exif 
EXIF Support enabled 
EXIF Version 1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $ 
Supported EXIF Version 0220 
Supported filetypes JPEG,TIFF 

filter 
Input Validation and Filtering enabled 
Revision $Revision: 298196 $ 

Directive Local Value Master Value 
filter.default unsafe_raw unsafe_raw 
filter.default_flags no value no value 

ftp 
FTP support enabled 

gd 
GD Support enabled 
GD Version bundled (2.0.34 compatible) 
FreeType Support enabled 
FreeType Linkage with freetype 
FreeType Version 2.2.1 
GIF Read Support enabled 
GIF Create Support enabled 
JPG Support enabled 
PNG Support enabled 
WBMP Support enabled 
XPM Support enabled 
XBM Support enabled 

gettext 
GetText Support enabled 

hash 
hash support enabled 
Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 

iconv 
iconv support enabled 
iconv implementation glibc 
iconv library version 2.5 

Directive Local Value Master Value 
iconv.input_encoding ISO-8859-1 ISO-8859-1 
iconv.internal_encoding ISO-8859-1 ISO-8859-1 
iconv.output_encoding ISO-8859-1 ISO-8859-1 

imagick 
imagick module enabled 
imagick module version 2.2.2 
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator 
ImageMagick version ImageMagick 6.4.8 2010-07-25 Q16 OpenMP http://www.imagemagick.org 
ImageMagick copyright Copyright (C) 1999-2009 ImageMagick Studio LLC 
ImageMagick release date 2010-07-25 
ImageMagick Number of supported formats: 191 
ImageMagick Supported formats A, AI, ART, ARW, AVI, AVS, B, BGR, BMP, BMP2, BMP3, BRF, BRG, C, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPS, DPX, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FITS, FRACTAL, FTS, G, G3, GBR, GIF, GIF87, GRADIENT, GRAY, GRB, HISTOGRAM, HTM, HTML, ICB, ICO, ICON, INFO, INLINE, IPL, ISOBRL, JNG, JPEG, JPG, K, K25, KDC, LABEL, M, M2V, M4V, MAP, MAT, MATTE, MIFF, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NULL, O, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG24, PNG32, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSD, PTIF, PWP, R, RADIAL-GRADIENT, RAF, RAS, RBG, RGB, RGBA, RGBO, RLA, RLE, SCR, SCT, SFW, SGI, SHTML, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UIL, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, Y, YCbCr, YCbCrA, YUV 

Directive Local Value Master Value 
imagick.locale_fix 0 0 
imagick.progress_monitor 0 0 

imap 
IMAP c-Client Version 2007e 
SSL Support enabled 
Kerberos Support enabled 

json 
json support enabled 
json version 1.2.1 

libxml 
libXML support active 
libXML Version 2.7.6 
libXML streams enabled 

mbstring 
Multibyte Support enabled 
Multibyte string engine libmbfl 
Multibyte (japanese) regex support enabled 
Multibyte regex (oniguruma) version 4.4.4 
Multibyte regex (oniguruma) backtrack check On 

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. 

Directive Local Value Master Value 
mbstring.detect_order no value no value 
mbstring.encoding_translation Off Off 
mbstring.func_overload 0 0 
mbstring.http_input pass pass 
mbstring.http_output pass pass 
mbstring.internal_encoding no value no value 
mbstring.language neutral neutral 
mbstring.strict_detection Off Off 
mbstring.substitute_character no value no value 

mcrypt 
mcrypt support enabled 
Version 2.5.8 
Api No 20021217 
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes 
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream 

Directive Local Value Master Value 
mcrypt.algorithms_dir no value no value 
mcrypt.modes_dir no value no value 

mhash 
MHASH support Enabled 
MHASH API Version 20060101 

mysql 
MySQL Support enabled 
Active Persistent Links 0 
Active Links 0 
Client API version 5.0.91 
MYSQL_MODULE_TYPE external 
MYSQL_SOCKET /var/lib/mysql/mysql.sock 
MYSQL_INCLUDE -I/usr/include/mysql 
MYSQL_LIBS -L/usr/lib64 -lmysqlclient 

Directive Local Value Master Value 
mysql.allow_persistent On On 
mysql.connect_timeout 60 60 
mysql.default_host no value no value 
mysql.default_password no value no value 
mysql.default_port no value no value 
mysql.default_socket no value no value 
mysql.default_user no value no value 
mysql.max_links Unlimited Unlimited 
mysql.max_persistent Unlimited Unlimited 
mysql.trace_mode Off Off 

mysqli 
MysqlI Support enabled 
Client API library version 5.0.91 
Client API header version 5.0.91 
MYSQLI_SOCKET /var/lib/mysql/mysql.sock 

Directive Local Value Master Value 
mysqli.default_host no value no value 
mysqli.default_port 3306 3306 
mysqli.default_pw no value no value 
mysqli.default_socket no value no value 
mysqli.default_user no value no value 
mysqli.max_links Unlimited Unlimited 
mysqli.reconnect Off Off 

openssl 
OpenSSL support enabled 
OpenSSL Version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 

pcre 
PCRE (Perl Compatible Regular Expressions) Support enabled 
PCRE Library Version 8.02 2010-03-19 

Directive Local Value Master Value 
pcre.backtrack_limit 100000 100000 
pcre.recursion_limit 100000 100000 

PDO 
PDO support enabled 
PDO drivers sqlite, sqlite2, mysql 

pdo_mysql 
PDO Driver for MySQL, client library version 5.0.91 

pdo_sqlite 
PDO Driver for SQLite 3.x enabled 
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $ 
SQLite Library 3.3.7 

pgsql 
PostgreSQL Support enabled 
PostgreSQL(libpq) Version 8.1.21 
Multibyte character support enabled 
SSL support enabled 
Active Persistent Links 0 
Active Links 0 

Directive Local Value Master Value 
pgsql.allow_persistent On On 
pgsql.auto_reset_persistent Off Off 
pgsql.ignore_notice Off Off 
pgsql.log_notice Off Off 
pgsql.max_links Unlimited Unlimited 
pgsql.max_persistent Unlimited Unlimited 

posix 
Revision $Revision: 293036 $ 

pspell 
PSpell Support enabled 

Reflection 
Reflection enabled 
Version $Id: php_reflection.c 300129 2010-06-03 00:43:37Z felipe $ 

session 
Session Support enabled 
Registered save handlers files user sqlite 
Registered serializer handlers php php_binary wddx 

Directive Local Value Master Value 
session.auto_start Off Off 
session.bug_compat_42 On On 
session.bug_compat_warn On On 
session.cache_expire 180 180 
session.cache_limiter nocache nocache 
session.cookie_domain no value no value 
session.cookie_httponly Off Off 
session.cookie_lifetime 0 0 
session.cookie_path//
session.cookie_secure Off Off 
session.entropy_file no value no value 
session.entropy_length 0 0 
session.gc_divisor 100 100 
session.gc_maxlifetime 1440 1440 
session.gc_probability 1 1 
session.hash_bits_per_character 4 4 
session.hash_function 0 0 
session.name PHPSESSID PHPSESSID 
session.referer_check no value no value 
session.save_handler files files 
session.save_path /tmp /tmp 
session.serialize_handler php php 
session.use_cookies On On 
session.use_only_cookies Off Off 
session.use_trans_sid 0 0 

SimpleXML 
Simplexml support enabled 
Revision $Revision: 299016 $ 
Schema support enabled 

sockets 
Sockets Support enabled 

SourceGuardian 
SourceGuardian Loader Support enabled 
SourceGuardian Loader Version 8.2 
SourceGuardian Loader Build Number 0x00000011 
phpSHIELD Support enabled 

Directive Local Value Master Value 
sourceguardian.restrict_unencoded 0 0 

SPL 
SPL support enabled 
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject 
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException 

SQLite 
SQLite support enabled 
PECL Module version 2.0-dev $Id: sqlite.c 298697 2010-04-28 12:10:10Z iliaa $ 
SQLite Library 2.8.17 
SQLite Encoding iso8859 

Directive Local Value Master Value 
sqlite.assoc_case 0 0 

standard 
Regex Library Bundled library enabled 
Dynamic Library Support enabled 
Path to sendmail /usr/sbin/sendmail -t -i 

Directive Local Value Master Value 
assert.active 1 1 
assert.bail 0 0 
assert.callback no value no value 
assert.quiet_eval 0 0 
assert.warning 1 1 
auto_detect_line_endings 0 0 
default_socket_timeout 60 60 
safe_mode_allowed_env_vars PHP_ PHP_ 
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH 
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset= 
user_agent no value no value 

tokenizer 
Tokenizer Support enabled 

wddx 
WDDX Support enabled 
WDDX Session Serializer enabled 

xml 
XML Support active 
XML Namespace Support active 
EXPAT Version expat_1.95.8 

xmlreader 
XMLReader enabled 

xmlrpc 
core library version xmlrpc-epi v. 0.51 
php extension version 0.51 
author Dan Libby 
homepage http://xmlrpc-epi.sourceforge.net 
open sourced by Epinions.com 

xmlwriter 
XMLWriter enabled 

xsl 
XSL enabled 
libxslt Version 1.1.26 
libxslt compiled against libxml Version 2.7.6 
EXSLT enabled 
libexslt Version 1.1.26 

Zend Optimizer 
Optimization Pass 1 enabled 
Optimization Pass 2 enabled 
Optimization Pass 3 enabled 
Optimization Pass 4 enabled 
Optimization Pass 9 enabled 
Zend Loader enabled 
License Path no value 
Obfuscation level 3 

zlib 
ZLib Support enabled 
Stream Wrapper support compress.zlib:// 
Stream Filter support zlib.inflate, zlib.deflate 
Compiled Version 1.2.3 
Linked Version 1.2.3 

Directive Local Value Master Value 
zlib.output_compression Off Off 
zlib.output_compression_level -1 -1 
zlib.output_handler no value no value 

Additional Modules 
Module Name 
ionCube Loader 

Environment 
Variable Value 
CONTENT_LENGTH 84 
CONTENT_TYPE application/x-www-form-urlencoded; charset=UTF-8 
DOCUMENT_ROOT /home/davekiss/public_html 
GATEWAY_INTERFACE CGI/1.1 
HTTP_ACCEPT */* 
HTTP_ACCEPT_ENCODING gzip, deflate 
HTTP_ACCEPT_LANGUAGE en-us 
HTTP_CACHE_CONTROL max-age=0 
HTTP_CONNECTION keep-alive 
HTTP_COOKIE __utma=185750460.516135541.1265907149.1265907149.1265907149.1; cprelogin=no; cpsession=asKpSrAbEDp4YgxoTDNjdLn17iwC86ERsoUcKLHDXMwojSdHTeND67uw_; logintheme=cpanel 
HTTP_HOST davekiss.com 
HTTP_ORIGIN http://davekiss.com 
HTTP_REFERER http://davekiss.com/ 
HTTP_USER_AGENT Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8 
HTTP_X_REQUESTED_WITH XMLHttpRequest 
PATH /bin:/usr/bin 
PHPRC /home/davekiss 
PHP_AUTH_PW xxxxxxx 
PHP_AUTH_USER xxxxxx 
QUERY_STRING no value 
REDIRECT_STATUS 200 
REMOTE_ADDR 76.205.121.33 
REMOTE_PORT 54915 
REQUEST_METHOD POST 
SERVER_ADDR 174.121.43.195 
SERVER_ADMIN [email protected] 
SERVER_NAME davekiss.com 
SERVER_PORT 80 
SERVER_PROTOCOL HTTP/1.1 
SERVER_SIGNATURE <address>Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 Server at davekiss.com Port 80</address> 
SERVER_SOFTWARE Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 

PHP Variables 
Variable Value 
_REQUEST["__utma"] 185750460.516135541.1265907149.1265907149.1265907149.1 
_REQUEST["cprelogin"] no 
_REQUEST["cpsession"] asKpSrAbEDp4YgxoTDNjdLn17iwC9Ij3OFU86ERsoUcKLHDXMwojSdHTeND67uw_ 
_REQUEST["logintheme"] cpanel 
_COOKIE["__utma"] 185750460.516135541.1265907149.1265907149.1265907149.1 
_COOKIE["cprelogin"] no 
_COOKIE["cpsession"] asKpSrAbEDp4YgxoTDNjdLn17iwC9Ij3OFU86ERsoUcKLHDXMwojSdHTeND67uw_ 
_COOKIE["logintheme"] cpanel 
_SERVER["CONTENT_LENGTH"] 84 
_SERVER["CONTENT_TYPE"] application/x-www-form-urlencoded; charset=UTF-8 
_SERVER["DOCUMENT_ROOT"] /home/davekiss/public_html 
_SERVER["GATEWAY_INTERFACE"] CGI/1.1 
_SERVER["HTTP_ACCEPT"] */* 
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate 
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us 
_SERVER["HTTP_CACHE_CONTROL"] max-age=0 
_SERVER["HTTP_CONNECTION"] keep-alive 
_SERVER["HTTP_COOKIE"] __utma=185750460.516135541.1265907149.1265907149.1265907149.1; cprelogin=no; cpsession=asKpSrAbEDp4YgxoTDNjdLn17iwC9Ij3OFU86ERsoUcKLHDXMwojSdHTeND67uw_; logintheme=cpanel 
_SERVER["HTTP_HOST"] davekiss.com 
_SERVER["HTTP_ORIGIN"] http://davekiss.com 
_SERVER["HTTP_REFERER"] http://davekiss.com/ 
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8 
_SERVER["HTTP_X_REQUESTED_WITH"] XMLHttpRequest 
_SERVER["PATH"] /bin:/usr/bin 
_SERVER["PHPRC"] /home/davekiss 
_SERVER["PHP_AUTH_PW"] xxxxxxx 
_SERVER["PHP_AUTH_USER"] xxxxxxx 
_SERVER["QUERY_STRING"] no value 
_SERVER["REDIRECT_STATUS"] 200 
_SERVER["REMOTE_ADDR"] 76.205.221.33 
_SERVER["REMOTE_PORT"] 54915 
_SERVER["REQUEST_METHOD"] POST 
_SERVER["REQUEST_URI"] /php/quick-quote.php 
_SERVER["SCRIPT_FILENAME"] /home/davekiss/public_html/php/quick-quote.php 
_SERVER["SCRIPT_NAME"] /php/quick-quote.php 
_SERVER["SERVER_ADDR"] 174.121.43.195 
_SERVER["SERVER_ADMIN"] [email protected] 
_SERVER["SERVER_NAME"] davekiss.com 
_SERVER["SERVER_PORT"] 80 
_SERVER["SERVER_PROTOCOL"] HTTP/1.1 
_SERVER["SERVER_SIGNATURE"] <address>Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 Server at davekiss.com Port 80</address> 
_SERVER["SERVER_SOFTWARE"] Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 
_SERVER["PHP_SELF"] /burnpost/php/quick-quote.php 
_SERVER["REQUEST_TIME"] 1287179383 
_SERVER["argv"] 
Array 
(
) 
_SERVER["argc"] 0 
_ENV["CONTENT_LENGTH"] 84 
_ENV["CONTENT_TYPE"] application/x-www-form-urlencoded; charset=UTF-8 
_ENV["DOCUMENT_ROOT"] /home/davekiss/public_html 
_ENV["GATEWAY_INTERFACE"] CGI/1.1 
_ENV["HTTP_ACCEPT"] */* 
_ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate 
_ENV["HTTP_ACCEPT_LANGUAGE"] en-us 
_ENV["HTTP_CACHE_CONTROL"] max-age=0 
_ENV["HTTP_CONNECTION"] keep-alive 
_ENV["HTTP_COOKIE"] __utma=185750460.516135541.1265907149.1265907149.1265907149.1; cprelogin=no; cpsession=asKpSrAbEDp4YgxoTDNjdLn17iwC9Ij3OFU86ERsoUcKLHDXMwojSdHTeND67uw_; logintheme=cpanel 
_ENV["HTTP_HOST"] davekiss.com 
_ENV["HTTP_ORIGIN"] http://davekiss.com 
_ENV["HTTP_REFERER"] http://davekiss.com/ 
_ENV["HTTP_USER_AGENT"] Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8 
_ENV["HTTP_X_REQUESTED_WITH"] XMLHttpRequest 
_ENV["PATH"] /bin:/usr/bin 
_ENV["PHPRC"] /home/davekiss 
_ENV["PHP_AUTH_PW"]xxxxxx 
_ENV["PHP_AUTH_USER"] xxxxxxxxxxxxx 
_ENV["QUERY_STRING"] no value 
_ENV["REDIRECT_STATUS"] 200 
_ENV["REMOTE_ADDR"] 76.205.121.33 
_ENV["REMOTE_PORT"] 54915 
_ENV["REQUEST_METHOD"] POST 
_ENV["REQUEST_URI"] /php/quick-quote.php 
_ENV["SCRIPT_FILENAME"] /home/davekiss/public_html/burnpost/php/quick-quote.php 
_ENV["SCRIPT_NAME"] /php/quick-quote.php 
_ENV["SERVER_ADDR"] 174.121.43.195 
_ENV["SERVER_ADMIN"] [email protected] 
_ENV["SERVER_NAME"] davekiss.com 
_ENV["SERVER_PORT"] 80 
_ENV["SERVER_PROTOCOL"] HTTP/1.1 
_ENV["SERVER_SIGNATURE"] <address>Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 Server at davekiss.com Port 80</address> 
_ENV["SERVER_SOFTWARE"] Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.28 
+0

在php方面,寫'print_r($ _POST);'並在這裏打印結果請。 – hookedonwinter 2010-10-15 21:43:18

+0

Array()是結果(我有一個會話在我的腳本中打開,因此無法解決問題。) – 2010-10-15 21:49:12

+0

我將不得不同意下面的海報並要求您執行<?php phpinfo() ; ?>;以便我們看到結果。 – riwalk 2010-10-15 21:57:55

回答

2

找到它。

我有我的post_max_filesize指令設置如此之高(3000),它將整數數據類型滾動到負值。我通過將我的php.ini的post_max_filesize設置爲128M來糾正此問題。

感謝所有提供他們的幫助!

0

那麼問題不在於您發佈的代碼。我把它移到了測試服務器上,你發佈的內容工作得很好。

幾件事情嘗試:

  • 你在哪裏印刷的價值觀?如果您在頁面上執行此第一件事(並且值在<html>標記之前),則它們可能無法呈現。做一個查看源以確保這些值沒有被髮布。
  • 使用fiddler檢查請求。這將告訴你什麼是實際上發送到您的PHP腳本的電線。

過去,沒有看到更多的代碼,我可以說沒有太多。

+0

我實際上是用cURL將變量發送給另一個腳本,但是我已經消除了這一步驟,只是爲了消除這種無法使用的任何額外可能性。我有一個jquery腳本設置爲將腳本的響應打印到div中,並且我得到的是手動回顯的字符串,但不是變量。 – 2010-10-15 22:00:23

+0

不幸的是,我在OSX上工作,所以fiddler不是一個選項,但螢火蟲顯示正常發佈的字符串鍵和值。 – 2010-10-15 22:06:09

+0

@Dave Kiss,在這種情況下,Wireshark。它也是一樣,只有更多。 – riwalk 2010-10-15 22:26:36