Skip to content

Tag: php

ldap filter for distinguishedName

I am successfully querying our Active Directory for a user with the following code: The resulting array gives this value for the manager attribute: This looks like a distinguishedName to me. But when I try to query for the manager’s record, the query fails with PHP Warning: ldap_search(): Search: Bad se…

Get Category name from Post ID

Is it possible to get the category name of a category given the Post ID, the following code works to get the Category Id, but how can I get the name? Thank! Answer here you go get_the_category( $post->ID ); will return the array of categories of that post you need to loop through the array get_the_category

How to create a migration in YII?

I have just started with YII and I am trying to create a new migration. I am using Xampp and it is located in the d drive of my system. The command that I am trying to use is: When I run the above command nothing happens, neither do I get an error message nor there is any error. I

PHP keeps sending data

The following function keeps loading the page and I can’t find the problem. The values are: $per_page = 10; $soort = 2; $query = “SELECT id, name, email, status FROM users WHERE company_id = ” . …

What does zend.multibyte directive exactly affect?

I am using UTF8 encoding without BOM for all my php scripts for years, and they work fine. Today i discovered that thereis core directive named zend.multibyte, and it is zero (disabled) by default. So, if it does not affect scripts parsing.. what exactly does it affect? Answer Zend Multibyte is needed for ASC…