English
version 2.2.1

  PClib - PHP component library

Dotazy a komentáře



deimos22. 09. 2009. 11:01:59
Thx for the answer !
lenochware16. 09. 2009. 14:30:06
Well... escaping of get,post,cookie params is driven by php configuration directive magic_quotes_gpc ( http://cz2.php.net/magic_quotes ).
But there are some possible problems: new pclib class db perform escaping of parameters automatically (with function $db->escape() ) so parameters from get or post will be escaped two times - which is definitely not good.

In php 6 magic_quotes should be removed, so easiest solution could be set this directive to false, if possible. I am not sure yet about some complex solution of this problem in library...

Anyway - I will probably add some fix in next version so at least form->values loaded from _POST or _GET will remove slashes automatically, when magic_quotes are on.
lenochware16. 09. 2009. 13:53:30
Hi,
You can use function paramstr() - it takes format string and array and replace parameters in string with values from array.
$people = $db->select_all('PEOPLE');
print paramstr("{NAME} <b>{SURNAME}</b><br>", $people);
deimos09. 09. 2009. 13:23:47
Hello, me again,

Still on &#224; test project, have included the new realease (btw nice one). is there an equivalent of the 1.2 member function of db htmlquery in the 1.3 ?

Oh, and for information, i had some probl&#232;me with / , i just added stripslashes on all _get, _post, _cookie. Certainly not the most elegant solution but all work fine for now.
deimos20. 08. 2009. 21:21:10
Thx, will try !
lenochware19. 08. 2009. 10:35:57
Keep in mind that you must set $config['AUTH_SALT'] before using auth. This string is used for encryption. Set something random like "xwZ14$bE". see auth->hash()
lenochware19. 08. 2009. 10:28:08
At now, there is some simple example in section Articles(cz) of this web. It is in czech language, but I think that source code is self-explanatory.
deimos18. 08. 2009. 20:40:15
Hi ! me again, things going for know, but will try to use auth class, do you have some example to show how to use it ?
deimos17. 08. 2009. 13:26:28
Tested error_reporting settings on local web server, work well, Thx !
deimos17. 08. 2009. 12:03:15
All going well for now. Working on a basic application for testing, just had to add a stripslashes at line 261 in form.php cause i had probleme in form view with quote in string. Will try your setting on my locale web server.

First | Last | 1 2 3 4 5