Hi All,

I have taken up this home project just for my pastime.

My objective is to take a html file and then make a complete new webpage with a specific keyword.
It basically is a find and replace type of method where my existing file contains a specific keyword where my parser comes through and edits.

So my basic approach was to ;

1)Read the initial html file line by line and move them into a vector containing strings
2)Then use the parse function on the string and then paste the string into a file.

I have pretty much succeeded doing all the above. And it the created page looks fine on my computer.

But when i upload it into my server. nothing is visible and when i open it up with a html editor Only The First line which is a html tag

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Is visible.

The rest of the html doesnt seem to be displayed.

Here is a basic example of what i was doing

string k;

Well, As i have not succeeded in getting my desired output. I wanted to ask whether anyone knows why this is happening?

So what are you saying the page opens OK as a html on your local machine but not on your server?

Yes exactly. On my Windows Computer it opens correctly. Apart from some scripts which arent running. But when i put it onto my server the whole thing is just dissapering

my host is byethost.com in his free pack.

Does your page try to run the .exe to generate the new page? Byethost disables the running of executables for some pretty important security reasons.

NO. I run the exe file manually and after the output file is created. I have uploaded it to the server.

I dont seem to understand whether it is the coding or the way which browsers read html.

The browser wouldn't make a difference if you use the same one to view pages on you local server as on your byethost server. Have you looked at the html source of both pages? I use byethost myself and uploading a file has never done this.

Well Yes. If i check the source in my computer it completely is showing up . But when i check the source in the Server it displays Blank............

Have you tried uploading it again? Tried uploading other files? This seems to have nothing to do with your C++ program.

Other files work. But the files generated by the program do not. i have been working on this from the past 15 hours or so to make it work. Uploading files clearing the cache and then again trying but, i just am unable to find the flaw.

Try posting a sample file generated by your program. Off the top of my head, I can't think of anything that would cause this.

I wonder if somehow the C++ program is introducing an EOF character prematurely. I strongly doubt it's a crlf \n issue (that is linux uses a different mechanism for new lines than does DOS/Windows). If I'm not mistaken, in linux EOF is ^D, and in M$ I think it's ^Z.... soooooooooo maybe there is an issue there... also, make sure it's not a permissions issue, though I imagine if it were, the web server would give you an error, other than a blank HTML.

Thank You Camatose And Death Clock. I have finally managed to figure out why my page wasnt displaying. It was because of a faulty piece of php code. So i guess my C++ worked properly ;)

I am absolutely sorry. To have made you all Perplexed with confusion.
I doubted my coding .. Which was not the appropriate to start over with.

When i switched on to display Php errors on the server. I caught a third party script which i was using had a messy but simple error.

Now it all works ;)

Thanks to you guys again .

Sorry for DOuble posting

Now i have another problem guys. Internet explorer 7 and Firefox both have given errors in the adsense scripts that i have posted and they say that there is a un-identified character that is being posted in the code.

here is a example of the website.



Now i think that it is being caused by the program becoz of

outputfile <<s<<endl;

So is there anyway of getting rid of that?