Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Writing a Template System in PHP

    I don't want to use SMARTY would it be a stupid idea to write my own code from scratch? Are there any tutorials on this?

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    First up - why dont you want to use smarty? Addressing that would be a good starting point in answering your question.
    Also how much experience do you have with PHP?

  • #3
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by NancyJ View Post
    First up - why dont you want to use smarty? Addressing that would be a good starting point in answering your question.
    Also how much experience do you have with PHP?
    Well I don't have much, but I want to use my own scripts... I don't like the idea of using pre-written scripts as I feel I won't learn that way...

  • #4
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    If you're not very experienced then I wouldnt recommend using your own custom templating system in a commercial environment - if you just want to play around on your own little server then thats OK but using it on a commercial/publically available site could cause problems if your solution isnt secure or robust enough to deal with real users.

  • #5
    Regular Coder
    Join Date
    Jun 2004
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a template engine is quite easy to write, it's basicly just about iterations and replacing variables.

  • #6
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I have been reading through a few tutorials I found... What I wanted to ask is, if I build my own template system for a test website. Can I use this on many other sites?

  • #7
    Regular Coder
    Join Date
    Jun 2004
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it would be quite stupid to write a template engine that only runs on one website


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •