C++ and Html Files

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2008
Posts: 675
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 99
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

C++ and Html Files

 
0
  #1
Mar 1st, 2009
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

  1. while(!inputfile.eof())
  2. {
  3. string k;
  4. getline(inputfile,k);
  5. parse(k);
  6. outputfile<<k<<endl;
  7. }
Well, As i have not succeeded in getting my desired output. I wanted to ask whether anyone knows why this is happening?
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: C++ and Html Files

 
0
  #2
Mar 1st, 2009
So what are you saying the page opens OK as a html on your local machine but not on your server?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 675
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 99
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

Re: C++ and Html Files

 
0
  #3
Mar 1st, 2009
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.
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: C++ and Html Files

 
0
  #4
Mar 1st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 675
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 99
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

Re: C++ and Html Files

 
0
  #5
Mar 1st, 2009
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.
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: C++ and Html Files

 
0
  #6
Mar 1st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 675
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 99
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

Re: C++ and Html Files

 
0
  #7
Mar 1st, 2009
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............
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: C++ and Html Files

 
0
  #8
Mar 1st, 2009
Have you tried uploading it again? Tried uploading other files? This seems to have nothing to do with your C++ program.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 675
Reputation: Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold Sky Diploma is a splendid one to behold 
Solved Threads: 99
Sky Diploma's Avatar
Sky Diploma Sky Diploma is offline Offline
Practically a Master Poster

Re: C++ and Html Files

 
0
  #9
Mar 1st, 2009
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.
1. Please Mark Your Thread as Solved After Getting Your Answers.
2. Please Use CODE TAGS .
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: C++ and Html Files

 
1
  #10
Mar 1st, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC