mkklepper Posted October 29, 2006 Share Posted October 29, 2006 I use two computers. My main studio PC is not hooked up to the internet. The other one is for the internet. I'm running the same software on both(Windows XP, WAMP, Dreamweaver). I copied the files from my studio PC to the internet PC and all of a sudden none of the variables work. [code]echo " My name is $var1. My favorite color is $var2.";[/code]It prints[code]My name is $var1. My favorite color is $var2.[/code]I've checked all the configuration files and the are the same. I know it's some mundane detail but I',m just not seeing it. Any suggestions? Link to comment https://forums.phpfreaks.com/topic/25443-why-doesnt-it-work/ Share on other sites More sharing options...
pendelton Posted October 29, 2006 Share Posted October 29, 2006 Can you add the following lines to you code:print "var1 = ".$var1.", var2 = ".$var2."<BR>\n";(make sure that the $var1 and $var2 are not in quotes).What's the output on the 2 machines? Link to comment https://forums.phpfreaks.com/topic/25443-why-doesnt-it-work/#findComment-116109 Share on other sites More sharing options...
mkklepper Posted October 29, 2006 Author Share Posted October 29, 2006 No, It preint the quotes and dots. Link to comment https://forums.phpfreaks.com/topic/25443-why-doesnt-it-work/#findComment-116112 Share on other sites More sharing options...
pendelton Posted October 29, 2006 Share Posted October 29, 2006 Can you provide the code for the complete file or at least several lines before and after the echo " My name is $var1. My favorite color is $var2.";? Link to comment https://forums.phpfreaks.com/topic/25443-why-doesnt-it-work/#findComment-116119 Share on other sites More sharing options...
pendelton Posted October 29, 2006 Share Posted October 29, 2006 I have just had an idea. I don't think that your second server is interpreting the file as PHP, it's just displaying the code as HTML. I assume that you aren't missing the <? ?> around your code and you are using a sensible file name extension like ".php"? If so, you need to check your server setup to ensure that it is including PHP correctly and that the PHP file extensions are defined in the config files correctly. Link to comment https://forums.phpfreaks.com/topic/25443-why-doesnt-it-work/#findComment-116122 Share on other sites More sharing options...
mkklepper Posted October 29, 2006 Author Share Posted October 29, 2006 NEVER MIND I GOT IT Link to comment https://forums.phpfreaks.com/topic/25443-why-doesnt-it-work/#findComment-116128 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.