佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 950|回复: 7

PHP 4 的程式升级到 PHP 5 的问题

[复制链接]
发表于 20-3-2006 11:46 PM | 显示全部楼层 |阅读模式

狼儿最近正在为自己以前编写的 WEBLOG(部落格) 程式做升级动作中遇到了一个很严重的问题。
一般狼儿在PHP 4里面都是用$HTTP_GET_VARS,$_POST,还有$_GET在传送variable到另一页的。
可是现在不懂为什么在PHP 5里面都用不到。
这个是狼儿个人电脑的问题吗?
还是在PHP 5里面有另外一些global variable代替了这些variable?
有那一位高手可以指点一下吗?
先谢谢咯~ ^^
回复

使用道具 举报


ADVERTISEMENT

发表于 21-3-2006 01:06 AM | 显示全部楼层
回复

使用道具 举报

 楼主| 发表于 21-3-2006 06:02 PM | 显示全部楼层

还是不能哦~! >_<
你们看看我的代码

  1. <?php
  2.    $name = $_GET['name'];
  3.    echo $name;
  4. ?>

  5. 配合这个link,http://localhost/index.php?name=me
复制代码

为什么还是不能抓到那个name的variable的?
这个程式在PHP 4里面是没有问题的,可是再PHP 5里面就不能了。
>_<
回复

使用道具 举报

 楼主| 发表于 24-3-2006 08:43 PM | 显示全部楼层

救命~!难道就没有解决的方法了吗?
回复

使用道具 举报

发表于 24-3-2006 09:25 PM | 显示全部楼层
狼儿, 没有道理,这么简单的CODE 应该运作正常的。PHP 5 和 4 在这个CODE 里并没有差别。
放上你的 PHPINFO() 吧, 让我看看。
回复

使用道具 举报

 楼主| 发表于 27-3-2006 08:23 PM | 显示全部楼层

对啊,这么简单的code狼儿应该不会出问题的。
可是偏偏就是有问题了! >_<
救命啊~!
P/S:为什么狼儿的电脑出现的PHPINFO不是网页而是Array状态的?奇怪也~!

  1. System => Windows NT JR 5.1 build 2600
  2. Build Date => Jan 11 2006 16:35:21
  3. Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--with-gd=shared"
  4. Server API => Command Line Interface
  5. Virtual Directory Support => enabled
  6. Configuration File (php.ini) Path => C:\PHP5\php.ini
  7. PHP API => 20041225
  8. PHP Extension => 20050922
  9. Zend Extension => 220051025
  10. Debug Build => no
  11. Thread Safety => enabled
  12. Zend Memory Manager => enabled
  13. IPv6 Support => enabled
  14. Registered PHP Streams => php, file, http, ftp, compress.zlib  
  15. Registered Stream Socket Transports => tcp, udp
  16. Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, zlib.*


  17. This program makes use of the Zend Scripting Language Engine:
  18. Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


  19. _______________________________________________________________________


  20. Configuration

  21. PHP Core

  22. Directive => Local Value => Master Value
  23. allow_call_time_pass_reference => Off => Off
  24. allow_url_fopen => On => On
  25. always_populate_raw_post_data => Off => Off
  26. arg_separator.input => & => &
  27. arg_separator.output => & => &
  28. asp_tags => Off => Off
  29. auto_append_file => no value => no value
  30. auto_globals_jit => On => On
  31. auto_prepend_file => no value => no value
  32. browscap => no value => no value
  33. default_charset => no value => no value
  34. default_mimetype => text/html => text/html
  35. define_syslog_variables => Off => Off
  36. disable_classes => no value => no value
  37. disable_functions => no value => no value
  38. display_errors => Off => Off
  39. display_startup_errors => Off => Off
  40. doc_root => no value => no value
  41. docref_ext => no value => no value
  42. docref_root => no value => no value
  43. enable_dl => On => On
  44. error_append_string => no value => no value
  45. error_log => no value => no value
  46. error_prepend_string => no value => no value
  47. error_reporting => 2047 => 2047
  48. expose_php => On => On
  49. extension_dir => ./ => ./
  50. file_uploads => On => On
  51. highlight.bg => #FFFFFF => #FFFFFF
  52. highlight.comment => #FF8000 => #FF8000
  53. highlight.default => #0000BB => #0000BB
  54. highlight.html => #000000 => #000000
  55. highlight.keyword => #007700 => #007700
  56. highlight.string => #DD0000 => #DD0000
  57. html_errors => Off => On
  58. ignore_repeated_errors => Off => Off
  59. ignore_repeated_source => Off => Off
  60. ignore_user_abort => Off => Off
  61. implicit_flush => On => Off
  62. include_path => .;C:\php5\pear => .;C:\php5\pear
  63. log_errors => On => On
  64. log_errors_max_len => 1024 => 1024
  65. magic_quotes_gpc => Off => Off
  66. magic_quotes_runtime => Off => Off
  67. magic_quotes_sybase => Off => Off
  68. mail.force_extra_parameters => no value => no value
  69. max_execution_time => 0 => 30
  70. max_input_time => 60 => 60
  71. open_basedir => no value => no value
  72. output_buffering => 0 => 4096
  73. output_handler => no value => no value
  74. post_max_size => 8M => 8M
  75. precision => 14 => 14
  76. realpath_cache_size => 16K => 16K
  77. realpath_cache_ttl => 120 => 120
  78. register_argc_argv => On => Off
  79. register_globals => Off => Off
  80. register_long_arrays => Off => Off
  81. report_memleaks => On => On
  82. report_zend_debug => Off => Off
  83. safe_mode => Off => Off
  84. safe_mode_exec_dir => no value => no value
  85. safe_mode_gid => Off => Off
  86. safe_mode_include_dir => no value => no value
  87. sendmail_from => no value => no value
  88. sendmail_path => no value => no value
  89. serialize_precision => 100 => 100
  90. short_open_tag => Off => Off
  91. SMTP => localhost => localhost
  92. smtp_port => 25 => 25
  93. sql.safe_mode => Off => Off
  94. track_errors => Off => Off
  95. unserialize_callback_func => no value => no value
  96. upload_max_filesize => 2M => 2M
  97. upload_tmp_dir => no value => no value
  98. user_dir => no value => no value
  99. variables_order => GPCS => GPCS
  100. xmlrpc_error_number => 0 => 0
  101. xmlrpc_errors => Off => Off
  102. y2k_compliance => On => On
  103. zend.ze1_compatibility_mode => Off => Off

  104. bcmath

  105. BCMath support => enabled

  106. calendar

  107. Calendar support => enabled

  108. com_dotnet

  109. COM support => enabled
  110. DCOM support => disabled
  111. .Net support => enabled

  112. Directive => Local Value => Master Value
  113. com.allow_dcom => 0 => 0
  114. com.autoregister_casesensitive => 1 => 1
  115. com.autoregister_typelib => 0 => 0
  116. com.autoregister_verbose => 0 => 0
  117. com.code_page => no value => no value
  118. com.typelib_file => no value => no value

  119. ctype

  120. ctype functions => enabled

  121. date

  122. date/time support => enabled
  123. Timezone Database Version => 2005.18
  124. Timezone Database => internal
  125. Default timezone => UTC

  126. Directive => Local Value => Master Value
  127. date.default_latitude => 31.7667 => 31.7667
  128. date.default_longitude => 35.2333 => 35.2333
  129. date.sunrise_zenith => 90.583333 => 90.583333
  130. date.sunset_zenith => 90.583333 => 90.583333
  131. date.timezone => no value => no value

  132. dom

  133. DOM/XML => enabled
  134. DOM/XML API Version => 20031129
  135. libxml Version => 2.6.22
  136. HTML Support => enabled
  137. XPath Support => enabled
  138. XPointer Support => enabled
  139. Schema Support => enabled
  140. RelaxNG Support => enabled

  141. ftp

  142. FTP support => enabled

  143. iconv

  144. iconv support => enabled
  145. iconv implementation => "libiconv"
  146. iconv library version => 1.9

  147. Directive => Local Value => Master Value
  148. iconv.input_encoding => ISO-8859-1 => ISO-8859-1
  149. iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
  150. iconv.output_encoding => ISO-8859-1 => ISO-8859-1

  151. libxml

  152. libXML support => active
  153. libXML Version => 2.6.22
  154. libXML streams => enabled

  155. odbc

  156. ODBC Support => enabled
  157. Active Persistent Links => 0
  158. Active Links => 0
  159. ODBC library => Win32

  160. Directive => Local Value => Master Value
  161. odbc.allow_persistent => On => On
  162. odbc.check_persistent => On => On
  163. odbc.default_db => no value => no value
  164. odbc.default_pw => no value => no value
  165. odbc.default_user => no value => no value
  166. odbc.defaultbinmode => return as is => return as is
  167. odbc.defaultlrl => return up to 4096 bytes => return up to 4096 bytes
  168. odbc.max_links => Unlimited => Unlimited
  169. odbc.max_persistent => Unlimited => Unlimited

  170. pcre

  171. PCRE (Perl Compatible Regular Expressions) Support => enabled
  172. PCRE Library Version => 6.2 01-Aug-2005

  173. Reflection

  174. Reflection => enabled
  175. Version => $Id: php_reflection.c,v 1.164.2.17 2006/01/01 12:50:12 sniper Exp $

  176. session

  177. Session Support => enabled
  178. Registered save handlers => files user
  179. Registered serializer handlers => php php_binary wddx

  180. Directive => Local Value => Master Value
  181. session.auto_start => Off => Off
  182. session.bug_compat_42 => Off => Off
  183. session.bug_compat_warn => On => On
  184. session.cache_expire => 180 => 180
  185. session.cache_limiter => nocache => nocache
  186. session.cookie_domain => no value => no value
  187. session.cookie_lifetime => 0 => 0
  188. session.cookie_path => / => /
  189. session.cookie_secure => Off => Off
  190. session.entropy_file => no value => no value
  191. session.entropy_length => 0 => 0
  192. session.gc_divisor => 1000 => 1000
  193. session.gc_maxlifetime => 1440 => 1440
  194. session.gc_probability => 1 => 1
  195. session.hash_bits_per_character => 5 => 5
  196. session.hash_function => 0 => 0
  197. session.name => PHPSESSID => PHPSESSID
  198. session.referer_check => no value => no value
  199. session.save_handler => files => files
  200. session.save_path => no value => no value
  201. session.serialize_handler => php => php
  202. session.use_cookies => On => On
  203. session.use_only_cookies => Off => Off
  204. session.use_trans_sid => 0 => 0

  205. SimpleXML

  206. Simplexml support => enabled
  207. Revision => $Revision: 1.151.2.10 $
  208. Schema support => enabled

  209. SPL

  210. SPL support => enabled
  211. Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
  212. 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, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

  213. standard

  214. Regex Library => Bundled library enabled
  215. Dynamic Library Support => enabled
  216. Internal Sendmail Support for Windows => enabled

  217. Directive => Local Value => Master Value
  218. assert.active => 1 => 1
  219. assert.bail => 0 => 0
  220. assert.callback => no value => no value
  221. assert.quiet_eval => 0 => 0
  222. assert.warning => 1 => 1
  223. auto_detect_line_endings => 0 => 0
  224. default_socket_timeout => 60 => 60
  225. safe_mode_allowed_env_vars => PHP_ => PHP_
  226. safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH
  227. url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
  228. user_agent => no value => no value

  229. tokenizer

  230. Tokenizer Support => enabled

  231. wddx

  232. WDDX Support => enabled
  233. WDDX Session Serializer => enabled

  234. xml

  235. XML Support => active
  236. XML Namespace Support => active
  237. libxml2 Version => 2.6.22

  238. xmlreader

  239. XMLReader => enabled

  240. xmlwriter

  241. XMLWriter => enabled

  242. zlib

  243. ZLib Support => enabled
  244. Stream Wrapper support => compress.zlib://
  245. Stream Filter support => zlib.inflate, zlib.deflate
  246. Compiled Version => 1.2.3
  247. Linked Version => 1.2.3

  248. Directive => Local Value => Master Value
  249. zlib.output_compression => Off => Off
  250. zlib.output_compression_level => -1 => -1
  251. zlib.output_handler => no value => no value

复制代码

回复

使用道具 举报

Follow Us
 楼主| 发表于 27-3-2006 08:24 PM | 显示全部楼层



  1. Additional Modules

  2. Module Name

  3. Environment

  4. Variable => Value
  5. GATEWAY_INTERFACE => CGI/1.1
  6. SERVER_NAME => localhost
  7. SERVER_SOFTWARE => Expert HTTP Server
  8. SERVER_PROTOCOL => HTTP/1.1
  9. HTTP_ACCEPT => */*
  10. HTTP_ACCEPT_CHARSET =>  
  11. HTTP_ACCEPT_ENCODING => gzip, deflate
  12. HTTP_ACCEPT_LANGUAGE => en
  13. HTTP_CONNECTION => Keep-Alive
  14. HTTP_HOST => localhost
  15. HTTP_REFERER => http://localhost/
  16. HTTP_USER_AGENT => Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
  17. REMOTE_ADDR => 127.0.0.1
  18. REMOTE_PORT => 1088
  19. SERVER_PORT => 80
  20. SERVER_SIGNATURE => Expert HTTP Server at localhost Port 80
  21. DOCUMENT_ROOT => c:
  22. REQUEST_METHOD => GET
  23. QUERY_STRING =>  
  24. SCRIPT_FILENAME => C:\phpinfo.php
  25. PATH_TRANSLATED => C:\phpinfo.php
  26. SCRIPT_NAME => /phpinfo.php
  27. REQUEST_URI => /phpinfo.php
  28. SYSTEMROOT => C:\WINDOWS
  29. WINDIR => C:\WINDOWS
  30. REDIRECT_STATUS => 0

  31. PHP Variables

  32. Variable => Value
  33. _SERVER["GATEWAY_INTERFACE"] => CGI/1.1
  34. _SERVER["SERVER_NAME"] => localhost
  35. _SERVER["SERVER_SOFTWARE"] => Expert HTTP Server
  36. _SERVER["SERVER_PROTOCOL"] => HTTP/1.1
  37. _SERVER["HTTP_ACCEPT"] => */*
  38. _SERVER["HTTP_ACCEPT_CHARSET"] =>
  39. _SERVER["HTTP_ACCEPT_ENCODING"] => gzip, deflate
  40. _SERVER["HTTP_ACCEPT_LANGUAGE"] => en
  41. _SERVER["HTTP_CONNECTION"] => Keep-Alive
  42. _SERVER["HTTP_HOST"] => localhost
  43. _SERVER["HTTP_REFERER"] => http://localhost/
  44. _SERVER["HTTP_USER_AGENT"] => Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
  45. _SERVER["REMOTE_ADDR"] => 127.0.0.1
  46. _SERVER["REMOTE_PORT"] => 1088
  47. _SERVER["SERVER_PORT"] => 80
  48. _SERVER["SERVER_SIGNATURE"] => Expert HTTP Server at localhost Port 80
  49. _SERVER["DOCUMENT_ROOT"] =>
  50. _SERVER["REQUEST_METHOD"] => GET
  51. _SERVER["QUERY_STRING"] =>
  52. _SERVER["SCRIPT_FILENAME"] => C:\phpinfo.php
  53. _SERVER["PATH_TRANSLATED"] => C:\phpinfo.php
  54. _SERVER["SCRIPT_NAME"] => C:\phpinfo.php
  55. _SERVER["REQUEST_URI"] => /phpinfo.php
  56. _SERVER["SYSTEMROOT"] => C:\WINDOWS
  57. _SERVER["WINDIR"] => C:\WINDOWS
  58. _SERVER["REDIRECT_STATUS"] => 0
  59. _SERVER["PHP_SELF"] => C:\phpinfo.php
  60. _SERVER["REQUEST_TIME"] => 1143462094
  61. _SERVER["argv"] => Array
  62. (
  63.     [0] => C:\phpinfo.php
  64. )

  65. _SERVER["argc"] => 1

  66. PHP License
  67. This program is free software; you can redistribute it and/or modify
  68. it under the terms of the PHP License as published by the PHP Group
  69. and included in the distribution in the file:  LICENSE

  70. This program is distributed in the hope that it will be useful,
  71. but WITHOUT ANY WARRANTY; without even the implied warranty of
  72. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  73. If you did not receive a copy of the PHP license, or have any
  74. questions about PHP licensing, please contact license@php.net.

复制代码

回复

使用道具 举报

 楼主| 发表于 1-4-2006 11:32 AM | 显示全部楼层
那一位好心人士可以帮帮忙,救救狼儿吗~?
回复

使用道具 举报


ADVERTISEMENT

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 11-11-2024 05:17 PM , Processed in 0.112450 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表