Skip to content

Tag: php

Fastest reimplementation PHP’s htmlspecialchars function in C

I need the default behaviour (i.e ENT_COMPAT | ENT_HTML401) of the PHP-function htmlspecialchars() in C, how is this done best (that means fastest) in C? I don’t need the input string, therefore an in-place solution is possible. It is a really simple function, it just converts these characters: What str…

How to store a array in a database?

I am trying to learn php databases and I have a question. How do I store an array in a database? I saw an answer on stackoverflow and there were they doing something with type double and in an other answer they were talking about creating a table for every user but I can’t find a solution. So summarized…

ZF2 Doctrine2 repository result as array

I have the problem, that I have two controllers. One is a restful controller which only handles json data and returns a JsonModel, and the other one is a default controller which returns a ViewModel Now I have the problem, that my method only returns an array of entities, which is correct for the default cont…

SQLite3 (PHP Fatal error: Call to a member function exec())

I’ve been innstall and add conf: I have installed the necessary components and added to the configuration file line, maybe in php.ini need to add something? Answer Unless Im missing something your protected $_db may never get set so you cannot call exec() on null. It will never get set if this does not …

Laravel 5 and PHPMailer

Does anybody have a working example how I can work with PHPMailer in Laravel 5? In Laravel 4 it was quiet simple to use but the same method doesn’t work in L5. Here it is what I did in L4: Added in …