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 = "you@somewhere.com"; $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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.