rus Posted September 2, 2008 Report Share Posted September 2, 2008 (edited) Возник вопрос:Мне нужно на сайте отобразить как выглядет код (структура) какого-нибудь функционала, как это сделать? С помощью какого тега?P.S. тег <pre> - не помогает, тоесть помогает, но не совсем, он не отображает html код и некоторые строчки из php, а конкретно:<table class='tableborder'> <tr> <td><p>%s</p></td> </tr> <tr> <td><p>%s</p></td> </tr> <tr> <td><p>%s</p></td> </tr> <tr> <td>%s</td> </tr></table>и php:<?php ?> Edited September 2, 2008 by rus Quote Link to comment Share on other sites More sharing options...
0 Vlad Posted September 2, 2008 Report Share Posted September 2, 2008 Вместо <> используй < > Quote Link to comment Share on other sites More sharing options...
0 rus Posted September 2, 2008 Author Report Share Posted September 2, 2008 Вместо <> используй < >Это так вместо каждой кавычки прописывать? Quote Link to comment Share on other sites More sharing options...
0 klierik Posted September 2, 2008 Report Share Posted September 2, 2008 ну да... и кстати именнно так и надо...так как символы "<" ">" - служебные. Quote Link to comment Share on other sites More sharing options...
0 rus Posted September 2, 2008 Author Report Share Posted September 2, 2008 Все понятно, спасибо Vlad и klierik Quote Link to comment Share on other sites More sharing options...
0 Dimitry Wolotko Posted September 2, 2008 Report Share Posted September 2, 2008 Через htmlspecialchars() пропусти кусок кода и всё. Quote Link to comment Share on other sites More sharing options...
Question
rus
Возник вопрос:
Мне нужно на сайте отобразить как выглядет код (структура) какого-нибудь функционала, как это сделать? С помощью какого тега?
P.S. тег <pre> - не помогает, тоесть помогает, но не совсем, он не отображает html код и некоторые строчки из php, а конкретно:
и php:
Edited by rusLink to comment
Share on other sites
5 answers to this question
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.
Note: Your post will require moderator approval before it will be visible.