My side dishes, found a good use of the lightweight ORM Library Idiorm, is simply feel convenient and afraid of their own writing things will have security problems so I want this.
His documentation is as follows: http://idiorm.readthedocs.org/en/latest/index.html
GitHub Address: Https://github.com/j4mie/idiorm
The index.php code is as follows:
Create (); $account->id = one, $account->account = 1236; $account->save ();
Each of them is on its own document:
The above code can be run on my local xampp.
But it's a problem on the SAE.
My SAE first created a database of my own, and the table name is account
Then in my directory downstream of these two files, (ORM is that Idiorm library)
The code in the corresponding index.php is:
Create (); $account->id = one, $account->account = 1236; $account->save (); >
Then, the following issues occur:
Therefore, I would like to ask you predecessors, I also Baidu for a long time, really I have limited knowledge level.
Thank you
Reply to discussion (solution)
SAE_MYSQL_XXXX is a constant!
Orm::configure (' mysql:host=w.rdc.sae.sina.com.cn:3307;dbname= '). sae_mysql_db); Orm::configure (' username ', sae_mysql_user); Orm::configure (' Password ', sae_mysql_pass);
In addition, the hostname, port name also applies the constants it provides SAE_MYSQL_HOST_M, Sae_mysql_port