Welcome Guest, Not a member yet? Register   Sign In
Save php code in database
#4

Saving PHP code in database commonly is a bad practice:
- after get a record from DB you have to parse all PHP codes and use eval() to execute those. It's a direct way to get XSS/SQL-injection.
- you end up with non transparent code that is difficult to debug when looking for errors.

Use relative URLs as was advised above. Never use hardcoded absolute URs with domain name specified. Otherwice you'll get a headache in case of use preffix like www. or subdomains m. for mobile version (and with http:/https too).
Reply


Messages In This Thread
Save php code in database - by guerreroretirado - 11-22-2020, 12:33 PM
RE: Save php code in database - by ojmichael - 11-22-2020, 09:21 PM
RE: Save php code in database - by sammyskills - 11-23-2020, 02:26 AM
RE: Save php code in database - by egranty - 11-23-2020, 09:59 AM
RE: Save php code in database - by InsiteFX - 11-24-2020, 06:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB