![]() |
Script problem or platform conversion error
i wrote this script on my windows box:
:
use CGI;and i uploaded to my hosting company's linux server, but instead of getting a newline were i was expecting a new line i got this small rectangle between the texts, for example this the output on my windows box: :
Testand this is the output on my server's linux box: :
Testcan some please tell me why this is. I thank you in advance for your replies. |
Redirect Problem
okay after some googling and alot of cursing and head scatching i found an alternative to this problem, which seemed to help, so decided to test this, so halfway through my testing i said "i wonder if i refresh the page what would happen", well i found out, it wrote to the file again and the same thing was outputted twice, then i thought how about i redirect the user to another page, so i tried, but no matter what page i redirected the user to i ke getting the 404 page not found page, i even tried using full paths, but still 404,does any body know what on earth is happening here, any help is greatley appreciated.
Regards, Kruptof |
Windows uses "\r\n" as its linebreak. Linux and other Unix-like systems use "\n". A simple substitution should convert between the two (s/\n/\r\n/g).
As for the redirect - can I see your redirection code? |
thanks Arevos......................ok here is the code for the redirection.....no matter what address i put in i will always get the 404 error:
:
#!/usr/bin/perl |
Try:
:
|
still gettting the same error, here is the new code:
:
#!/Perl/bin/perl |
after some googling and some trails and errors i have found this:
:
print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>";there is still some thing wrong with this html but i will post that in the html forum.......thank you everyone for the help. |
What happens if you put the full URL in? And what happens when you go to said URL normally?
|
i got an error 404
|
In both cases? Then surely it's nothing to do with the redirect script, but because the URL you're going to does not exist.
|
| All times are GMT -5. The time now is 10:12 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC