Forums
This topic is locked
Issue PHP and MySQL
Posted 25 Nov 2002 13:28:30
1
has voted
25 Nov 2002 13:28:30 Johan Korten posted:
I started using PHP yesterday and it ssems to be that my Dreamweaver MX generated PHP with recordsets does not work due to this issue (a manually created php connection to the db does work!)www.macromedia.com/support/dreamweaver/ts/documents/httppostvars_why.htm
How can I get dreamweaver to generate updated code???
Replies
Replied 04 Dec 2002 02:31:43
04 Dec 2002 02:31:43 Tim Green replied:
One way to achieve this is to force a little logic into your page.
Create a new file called version.php and enter the following:-
<?php
if (phpversion() > "4.0.6" {
$HTTP_POST_VARS = &$_POST;
$HTTP_GET_VARS = &$_GET;
$HTTP_SERVER_VARS = &$_SERVER;
$HTTP_SESSION_VARS = &$_SESSION;
$HTTP_COOKIE_VARS = &$_COOKIE;
$HTTP_ENV_VARS = &$_ENV;
$PHP_SELF = getenv("PHP_SELF"
}
?>
Save this file in the root of your website. Now all you have to do is to add the following line before each and every PHP file you create in DMX:-
<?php include("version.php" ?>
This should resolve the problem for you.
*** Important Note ***
The include() statement MUST ALWAYS be at the very start of your PHP file, so you may need to check that it is in the right place before you test your work.
I hope this helps
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Create a new file called version.php and enter the following:-
<?php
if (phpversion() > "4.0.6" {
$HTTP_POST_VARS = &$_POST;
$HTTP_GET_VARS = &$_GET;
$HTTP_SERVER_VARS = &$_SERVER;
$HTTP_SESSION_VARS = &$_SESSION;
$HTTP_COOKIE_VARS = &$_COOKIE;
$HTTP_ENV_VARS = &$_ENV;
$PHP_SELF = getenv("PHP_SELF"
}
?>
Save this file in the root of your website. Now all you have to do is to add the following line before each and every PHP file you create in DMX:-
<?php include("version.php" ?>
This should resolve the problem for you.
*** Important Note ***
The include() statement MUST ALWAYS be at the very start of your PHP file, so you may need to check that it is in the right place before you test your work.
I hope this helps
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>