How to call a php function if function name is given as string

Standard

Sometimes we require to call a function with the name given as string variable. I wanted it. Just wondering how to do that in PHP? Here are the methods:

We have one inbuilt function to solve this purpose 1.call_user_func and another way is 2. Using function name as variable.

Continue reading

Configure apache php server to point location another then htdocs or www

Standard

Obviously! we can point apache server to pick our code files from another location other then www or htdocs. Also we can configure the url for our project folder.

Lets take a look how.

Step 1. Look for the file httpd.conf (this can be found under your apache installation folder inside conf directory)

Continue reading