How to Store and Display "Code Block" in PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • conduonghoahong
    New Member
    • Oct 2013
    • 2

    #1

    How to Store and Display "Code Block" in PHP?

    i am development a SEARCH ENGINE, I want to Store and Display a lot of Code block in my Search site using PHP, the code block which is in any programming language ( PHP, JS, Node.js...)
    them will display like BBcode function of Vbforum.

    i estimate about 10.000 code block will store.

    where to store? and how them display in mysite?
    can I store them in Database, if that, how to avoid SQL Injection?
    Another way, how to implement that? thank you.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    where to store?
    databases come to mind

    can I store them in Database, if that, how to avoid SQL Injection?
    1) use Prepared (Parameterized) Statements
    2) use a NoSQL DB

    Comment

    Working...