Closed liaojiansong closed 3 years ago
Hello
Please show your PostModel class
<?php
namespace Castle\Models;
use Phalcon\Mvc\Model;
class PostModel extends Model
{
public $id;
public $title;
public $content;
public function initialize()
{
$this->setSource("post");
$this->useDynamicUpdate(true);
}
}
Here is database config
$di->setShared('db', function () use ($config,$di) {
$dbConfig = $config->database;
$connection = new \Phalcon\Db\Adapter\Pdo\Mysql([
'host' => $dbConfig->host,
'username' => $dbConfig->username,
'password' => $dbConfig->password,
'dbname' => $dbConfig->dbname,
'charset' => $dbConfig->charset,
'port' => $dbConfig->port,
]);
return $connection;
});
Thank you,Jeckerson. Maybe i used the 'string' filter in the getPost() method,so my html tag was filtered out. Now,I close this issue
The code looks like this.
this is something ...\
tag
this is something ...
So,what am I supposed to do?
PHP:7.4.8 Phalcon:4.1.0 Mysql:5.7.24 OS:Centos7
By the way,in win10 it is ok,only in centos will remove html tag