Jump to content

[SOLVED] Testing Tutorial on Apache VS. Server... 5.2 VS 4.4.4?


suttercain

Recommended Posts

Hi Everyone,

 

I just installed WAMP and trying to learn "Classes." I went to the phpfreaks tutorials sections and used this code:

 

<? 
include "php.php";

$myclass = &New MyClass;

$myclass->email = "yousomewhere.com";

$check_email = $myclass->check_email();

if(!$check_email){
    echo "The email address is not valid!";
} else {
    echo "The email address is valid!";
}

?>

 

This is my thing. When I run it on my localhost using PHP 5.2 and view it via Firefox I get this:

email = "[email protected]"; $check_email = $myclass->check_email(); if(!$check_email){ echo "The email address is not valid!"; } else { echo "The email address is valid!"; } ?>

 

But when I upload it on my server which is running PHP 4.4.4 the script works fine and I get this:

The email address is valid!

 

Is it a 4.4 VS 5.2 issue? Is it an Apache issue? Any help would be great. Thanks ladies and gentleman.

 

Shannon

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.