shlomikalfa Posted September 18, 2008 Share Posted September 18, 2008 how could it be that the following code: <?php echo "<BR> asjkldhasdas </BR>"; ?> produces this: asjkldhasdas "; ?> in a .php file as i open it with the browser ? I have just un'installed and re'installed the WampServer2.0, please help! Thanks for your help !!! Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 What is "</BR>"? They should both be <br> or <br /> . Quote Link to comment Share on other sites More sharing options...
shlomikalfa Posted September 18, 2008 Author Share Posted September 18, 2008 <?php echo "<br>klftgiuyfg<br />"; ?> strill produces: klftgiuyfg "; ?> Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 You're doing something else, because I just copied both of your examples and neither are producing that. Put the rest of your code here. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 18, 2008 Share Posted September 18, 2008 Did you copy/paste your code here? Because code works, as if you had something like that <?php echo '<br>klftgiuyfg<br />"; ?> note ' and " quotes. edit: Seems like php an code tags eat up ' quotes? ??? There should be a ' before first < br> Quote Link to comment Share on other sites More sharing options...
mbrown Posted September 18, 2008 Share Posted September 18, 2008 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php //there is a line before "klftgiuyfg" echo "<br>klftgiuyfg<br />"; ?> </body> </html> I believe works like you want. Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Are you sure you're uploading your code to your server? It looks fine, and I tested it on my server, and it works fine. Quote Link to comment Share on other sites More sharing options...
shlomikalfa Posted September 18, 2008 Author Share Posted September 18, 2008 i've just opened a new .php file and just copy / paste the entire thing you've sent me... klftgiuyfg "; ?> seem like i am not soo far from the truth... wamp error probably... any IDEA ? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 18, 2008 Share Posted September 18, 2008 Copy and past this into a BRAND NEW FILE: <?php echo 'Hello<br />'; ?> Save to your server. DO NOT PLACE ANYTHING ELSE IN THIS FILE Quote Link to comment Share on other sites More sharing options...
DarkWater Posted September 18, 2008 Share Posted September 18, 2008 I'd be willing to bet that he's opening it directly through the filesystem and not the server. Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Good call. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 18, 2008 Share Posted September 18, 2008 Then we'd see also opening <?php tag and echo instruction. I'd be willing to bet on unpaired quotes. Quote Link to comment Share on other sites More sharing options...
shlomikalfa Posted September 18, 2008 Author Share Posted September 18, 2008 oky... lets assume the "New Guy" is not a complete moron... any other ideas ? -. I open 'Brand New File' from: http://localhost/NewProj/E-NewSite/tryouts.php this address. -. I do place proper quotes. That: http://localhost/NewProj/E-NewSite/tryouts.php Produces: '; ?> Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 That's it. PHP isn't running, or something. I just copied your whole file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php //there is a line before "klftgiuyfg" echo "<br>klftgiuyfg<br />"; ?> </body> </html> and named the file "test.html" and I get: klftgiuyfg "; ?> as my output. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted September 18, 2008 Share Posted September 18, 2008 I figured as much. I think the HTML parsing engine is taking the first PHP tag and not displaying it, sort of like they do with XML tags without Content-Type: text/xml headers. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 18, 2008 Share Posted September 18, 2008 Ok. So what colour is your WampServer tray icon? If its white, go to http://localhost/?phpinfo=1 Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Exactly. In fact, when I view the source of the page in firefox, it looks like either the "<?php" and/or the "//" are commenting out everything up until the ">" in the "<br>." Then, the rest is displayed. Quote Link to comment Share on other sites More sharing options...
shlomikalfa Posted September 18, 2008 Author Share Posted September 18, 2008 phpinfo() is working... all the tables are in place and filled... PHP Variables Variable Value _REQUEST["phpinfo"] 1 _GET["phpinfo"] 1 _SERVER["HTTP_HOST"] localhost _SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 _SERVER["HTTP_ACCEPT"] text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5 _SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate _SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7 _SERVER["HTTP_KEEP_ALIVE"] 300 _SERVER["HTTP_CONNECTION"] keep-alive _SERVER["HTTP_REFERER"] http://www.phpfreaks.com/forums/index.php/topic,217283.15.html _SERVER["PATH"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem _SERVER["SystemRoot"] C:\WINDOWS _SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH _SERVER["WINDIR"] C:\WINDOWS _SERVER["SERVER_SIGNATURE"] no value _SERVER["SERVER_SOFTWARE"] Apache/2.2.8 (Win32) PHP/5.2.6 _SERVER["SERVER_NAME"] localhost _SERVER["SERVER_ADDR"] 127.0.0.1 _SERVER["SERVER_PORT"] 80 _SERVER["REMOTE_ADDR"] 127.0.0.1 _SERVER["DOCUMENT_ROOT"] C:/wamp/www/ _SERVER["SERVER_ADMIN"] admin@localhost _SERVER["SCRIPT_FILENAME"] C:/wamp/www/index.php _SERVER["REMOTE_PORT"] 1769 _SERVER["GATEWAY_INTERFACE"] CGI/1.1 _SERVER["SERVER_PROTOCOL"] HTTP/1.1 _SERVER["REQUEST_METHOD"] GET _SERVER["QUERY_STRING"] phpinfo=1 _SERVER["REQUEST_URI"] /?phpinfo=1 _SERVER["SCRIPT_NAME"] /index.php _SERVER["PHP_SELF"] /index.php _SERVER["REQUEST_TIME"] 1221775057 however... other pages that i know that works on my server aren't at home... -> they are in inside directories, inside WWW..... SomeSubDirs/Page.php.... Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 18, 2008 Share Posted September 18, 2008 That's strange, but I have one more idea. Check if there are no spaces or other non standard characters in the path to your scripts. I think - might cause problems as well. Quote Link to comment Share on other sites More sharing options...
shlomikalfa Posted September 19, 2008 Author Share Posted September 19, 2008 there are no foreign language in the path: C:\wamp\www\NewProj\S-NewSite but it seems like you are correct.... when i put the material in the main dir it works... in the sub dirs it doesn't ... any idea ???? Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 19, 2008 Share Posted September 19, 2008 Try S_NewSite instead. I'm just guessing. If that doesn't work, perhaps you should ask guys on WampServers home page for the advice? I've never had such problems with WampServer myself 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.