Inserting html code in a mysql table

后端 未结 11 832
我在风中等你
我在风中等你 2020-12-11 01:14

I use joomla to manage a website... and i am developing a stand alone php application that will insert and modify data into the tables that are used by joomla to store the

11条回答
  •  [愿得一人]
    2020-12-11 01:59

    if you are worried about space and are using the base 64 encode method posted here you could use the gzdeflate command in php to cut it down then encode it. Here is a little test script on some generated sample characters. Obviously there are different compression methods to look into if you are concerned with size but this would mean you could put it into mysql minimising the size on the db. You could then read it back with gzinflate(base64_decode( ... ));

    '.'Original base64 size:'.strlen($b64html);
    $compressed = gzdeflate($string,  9);
    echo '
    '.'compressed size:'.strlen($compressed); echo '
    '.'base64 compressed size:'.strlen(base64_encode($compressed)); /* insert into db the base64_encode($compressed); */ ?>

提交回复
热议问题