This is a discussion on "Render html with php" within the PHP Forum section. This forum, and the thread "Render html with php are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Render html with php
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Render html with php
Such a frustrating day... web host has been on the blink but i have finally proved its not a problem with the apache set up on my laptop.
So, i must be doing something wrong with my coding. I am using a class called textile to render the input in html. Unfortunately it is coming out as this. <p>This is a test</p> What do i have to need to do to make these tags actually be rendered by html? |
|
|
|
#2
|
|||
|
|||
|
Re: Render html with php
Are you saying that the page that is served up to the browser contains these tags but that they don't show?
|
|
#3
|
|||
|
|||
|
Re: Render html with php
Yes. If i echo out <i>Text</i> then it comes back as Italic text. If i use textile, http://www.textism.com/tools/textile/ it just brings back the tags but doesn't process it into a formatted page. The same happens if input tags via my input form. It will store the text and tags ok but when it is called it doesn't work.
Furthermore when i use n12br it also just returns <br /> instead of an actual break. Is there something i need to put around the variable to make it show? |
|
#4
|
||||
|
||||
|
Re: Render html with php
I use Textile all the time, I've never had problems with it. You're actually getting the HTML markup, not what it will look like in a browser. Could you upload this and link us up?
|
|
#5
|
|||
|
|||
|
Re: Render html with php
Can you show us a complete example of the generated page?
|
|
#6
|
|||
|
|||
|
Re: Render html with php
Here's an example of it not rendering... the sites not completed but you can see http://www.jasonstanley.co.uk/UNC/index.php?action=all
My script looks as follows. www.jasonstanley.co.uk/code.txt Sorry if the codings a little messy. Textile is used in the displayNews function |
|
#7
|
||||
|
||||
|
Re: Render html with php
My guess is that you've got something in your PHP that is telling the string to turn HTML characters into entities. Textile itself will not turn a < be <, so there is something else in there that's doing it.
|
|
#8
|
|||
|
|||
|
Re: Render html with php
As Ryan suggests, you need to look through your scripts to see where this code is being generated.
I also notice that your html code contains tags like <CENTER>. These are deprecated in xhtml. You should be using css to centre items. As an additional note, tag (element) names should always be in lowercase with xhtml. |
|
#9
|
|||
|
|||
|
Re: Render html with php
Yeah geoff i know that, i was just using tables to structure the page to get it working. I am starting to design the page now and these things will all be removed.
It works if i remove the bbcode( ) around the $processed news variable. Can someone look over my code and see if they can see anything in this script that would have such an effect?
|
|
#10
|
|||
|
|||
|
Re: Render html with php
It's the htmlentities function that is taking your '<' and converting that to <, etc.
|
|
#11
|
||||
|
||||
|
Re: Render html with php
Yep... Knew that had to be in there somewhere.
|
|
#12
|
|||
|
|||
|
Re: Render html with php
ah thank you so much
|
![]() |
| Tags |
| render html |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| attachMovie will not render in avi | exactspace | Flash & Multimedia Forum | 0 | Nov 13th, 2007 15:21 |
| Help with my html | totally new | Web Page Design | 12 | May 30th, 2007 20:39 |
| Render HTML inside CDATA with XSL | zweb | Other Programming Languages | 0 | Sep 10th, 2006 16:19 |