suttercain Posted February 15, 2007 Share Posted February 15, 2007 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 Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted February 15, 2007 Share Posted February 15, 2007 Does your local server have short php tags turned on...I don't think it is by default, so you would have to change it in php.ini? Change the "<?" to "<?php" and see if you get the same result. Quote Link to comment Share on other sites More sharing options...
suttercain Posted February 15, 2007 Author Share Posted February 15, 2007 I make the Homer Simpson "Doh" sound. Thanks. Quote Link to comment Share on other sites More sharing options...
Daney11 Posted February 15, 2007 Share Posted February 15, 2007 Yer i use wamp aswell and a lot of my scripts where <? but i didnt have the setting allowed so i had to change them all to <?php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.