Jump to content

PHP from mysql!?!?


rofl90

Recommended Posts

No, it is not a glitch. I am assuming you are storing "text" in the form of PHP code in your database and then querying for that code - which is actually "text" not code. You could use the exec() command, but I think there are probably much better solutions than storing PHP code int he database to begin with.

Link to comment
https://forums.phpfreaks.com/topic/95750-php-from-mysql/#findComment-490247
Share on other sites

what ways then?

 

Keep the code in the php file where it belongs and not in the database. A database is meant for data not code. You have not provided any information concerning the reason for wanting to put code into the database so I cannot provide any meaningful comments. But, the fact that you can't simply take "code" from the database and have it execute should be a clue that it was not built for that purpose.

 

But, like I said you should be able to so it with exec()

Link to comment
https://forums.phpfreaks.com/topic/95750-php-from-mysql/#findComment-490251
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.