dhiman252
(Dhiman252)
September 2, 2014, 8:01am
1
hello guys,
please refer to image1
i am trying to save a php code in the database and able to do so.
please refer to image 2
when i extract the data from the database it does not show the php code.
I have a situation where i will need to save the page html and some of the content is dynamic. like recent and popular blocks which will be load the data from the database. i will need to save both the html and php code but not able to do so. please help.
hello guys,
please refer to image1
http://prntscr.com/4ivu38
i am trying to save a php code in the database and able to do so.
please refer to image 2
http://prntscr.com/4ivuf0
when i extract the data from the database it does not show the php code.
I have a situation where i will need to save the page html and some of the content is dynamic. like recent and popular blocks which will be load the data from the database. i will need to save both the html and php code but not able to do so. please help.
Try to put this in cgridview columns :: ‘type’ => ‘raw’,
array(
'name' => 'person_name',
'type' => 'raw',
'value' => $person_name
)
dhiman252
(Dhiman252)
September 2, 2014, 11:06am
3
Try to put this in cgridview columns :: ‘type’ => ‘raw’,
array(
'name' => 'person_name',
'type' => 'raw',
'value' => $person_name
)
Well thanks for the reply but i dont need to show the html in cgridview instead i have the whole page html including some php code.
Can you show some of your code here?
dhiman252
(Dhiman252)
September 3, 2014, 8:50am
5
$content_from_database_containing_html_and_PHP_code = ‘<p>Blogs Page</p><?php echo Site::getBlogs(); ?> <p>Blog Page Content End</p>’;
i have been able to do so using PHP function eval(’?>’.$content_from_database_containing_html_and_PHP_code);