mengatasi eror di php 4

Ada beberapa built-in function dalam PHP 4 yang dihilangkan dalam PHP 5, karena masalah keamanan (security problem issue).

Dalam kasus form anda, kemungkinan anda menggunakan metode GET / POST dalam mengirimkan data. Di PHP 4 hasil pengiriman data (variable) dapat di ambil secara langsung, contohnya: jika formulir mengirimkan username="aku" maka variable tersebut bisa diproses hanya dengan cara echo $my_variable; saja. Tetapi di PHP 5 untuk memproses variable tersebut harus menggunakan metode echo $_GET["username"];.

Solusi: anda dapat mengganti setiap proses dengan menggunakan metode diatas.

Berikut kutipan dari situs developer PHP:
"Global variables are no longer registered for input data (POST, GET, cookies, environment and other server variables). Instead of using $foo, you must use or you can use $_REQUEST["foo"] (includes any variable that arrives through the request, namely, POST, GET and cookie variables), or use one of the specific $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending on where the input originates. Also, you can look at the import_request_variables() function.

Note that register_globals is going to be depracated (i.e., turned off by default) in the next version of PHP, because it often leads to security bugs.


Read http://php.net/manual/en/security.registerglobals.php for further information."


Powered by Qumana


Comments

Popular posts from this blog

The Right SEO Campaign Can Turn Your Website Into The First Class Rail Road For Traffic

upload vbulletin