I would like to know your opinion on developing a .html web pages site using code igniter? Is it good to develop static sites/pages.html using CI?
I am considering this for developing a secure sta开发者_JAVA百科tic site. often my website is attacked by spammers (injecting external code put in and redirects to some other sites) etc.,
Also thinking to implement better SEO with CI.
what do you think experts?
Developing a complete static website in CI with just HTML pages is going way too overboard. Using a framework does not automatically take care of all security issues - it just makes it a lot easier to handle rudimentary security related issues with user input.
If there will be no server side or database interaction, the scope of your security will be limited to the server on which you're hosted on (and your passwords obviously).
SEO with static pages will not be better than the CI counterpart and vice versa. This will be entirely up to how you code the site and what sort of relevant data you offer and other various external variables that are associated with SEO (like in bound links). However, a static website, implies static content, which in turn implies slow updating of content or lack thereof - which search engines hate.
you need to remove those XSS code
did you already try this php function strip_tags()? you can also exclude html tags from being stripped ie. $commentmessage = strip_tags($commentmessage,'<img><a>');
精彩评论