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 = "[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 Link to comment https://forums.phpfreaks.com/topic/38568-solved-testing-tutorial-on-apache-vs-server-52-vs-444/ 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. Link to comment https://forums.phpfreaks.com/topic/38568-solved-testing-tutorial-on-apache-vs-server-52-vs-444/#findComment-185118 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. Link to comment https://forums.phpfreaks.com/topic/38568-solved-testing-tutorial-on-apache-vs-server-52-vs-444/#findComment-185122 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 Link to comment https://forums.phpfreaks.com/topic/38568-solved-testing-tutorial-on-apache-vs-server-52-vs-444/#findComment-185211 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.