Trending questions in PHP

0 votes
1 answer

How can I connect to a Tor hidden service using CURL in PHP?

Hello @kartik, I use Privoxy and cURL to scrape Tor ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
64 views
0 votes
1 answer

PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR

Hello @kartik, Change to as your syntax was ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
34 views
0 votes
1 answer

Error:Enabling error display in PHP via htaccess only?

Hello, To turn the actual display of errors ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
23 views
0 votes
1 answer

How can I create XAMPP/Apache serve file outside of htdocs?

Hello @kartik, You can relocate it by editing ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
20 views
0 votes
1 answer

How to convert from MySQL datetime to another format with PHP?

Hello, To convert a date retrieved from MySQL ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
21 views
0 votes
1 answer

How to find the php.ini file used by the command line?

Hello @kartik, You can get a full phpinfo() using : php ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
20 views
0 votes
1 answer

How to do error logging in CodeIgniter ?

Hello @kartik, CodeIgniter has some error logging functions ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
18 views
0 votes
1 answer

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in .?

Hello @kartik, You may get this error because ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
15 views
0 votes
1 answer

How can I expire a PHP session after 50 minutes?

Hii @kartik, Use the session_set_cookie_paramsfunciton for make this. Is necessary ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
20 views
0 votes
1 answer

Error:mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource

Hello, Error occurred here was due to the ...READ MORE

May 19 in PHP by Niroj
• 21,680 points
19 views
0 votes
1 answer

Error Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING

Hello @kartik, Make sure they are running Latest ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
87 views
0 votes
1 answer

How do I get all posts from $wp_query in the search results in wordpress?

Hello @kartik, Set posts_per_page parameter in args to ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
30 views
0 votes
1 answer

How to load Javascript in Wordpress Plugin?

Hello kartik, You need to specify when the ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
26 views
0 votes
1 answer

ERROR: The file 'wp-config.php' already exists

Hello, Try to display the website first on ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
25 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
23 views
0 votes
1 answer

How to get the current plugin directory in WordPress?

Hello @kartik, This will actually get the result ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
23 views
0 votes
1 answer

Error:while importing Table for WORDPRESS

Hello @kartik, I had the same error when ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
19 views
0 votes
1 answer

Error:WP_Query() does not return all entries

Hello, Try adding posts_per_page=-1 to the string of parameters passed ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
20 views
0 votes
1 answer

How to add custom javascript to WordPress Admin?

Hello, Use the admin_enqueue_scripts action and the wp_enqueue_script method to add custom ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
21 views
0 votes
1 answer

How can I add a PHP page to WordPress?

Hii @kartik, You don't need to interact with ...READ MORE

May 8 in PHP by Niroj
• 21,680 points
19 views
0 votes
1 answer

How can we track Google Analytics on a redirection page with PHP?

Hello @kartik, Since the page that is sending ...READ MORE

Apr 29 in PHP by Niroj
• 21,680 points
37 views
0 votes
1 answer

How to detect search engine bots with php?

Hello, You can checkout if it's a search ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
58 views
0 votes
1 answer

How do I let PHP to create subdomain automatically for each user?

Hello @kartik, We setup wildcard DNS like they ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
51 views
0 votes
1 answer

Error:“Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP

Hii, I edited /etc/phpmyadmin/config.inc.php and changed the following ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
49 views
0 votes
1 answer

How to query all the GraphQL type fields without writing a long query?

Hello @kartik, GraphQL query format was designed in order ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
45 views
0 votes
1 answer

How to resolve “must be an instance of string, string given” prior to PHP 7?

Hello, Prior to PHP 7 type hinting can only be ...READ MORE

Apr 20 in PHP by I Navin
• 220 points
44 views
0 votes
1 answer

error: Class 'PHPUnit_Framework_TestCase' not found in …?

Hello,  You can use TestCase instead PHPUnit_Framework_TestCase // use the following namespace use ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
32 views
0 votes
1 answer

Why does the PHP json_encode function convert UTF-8 strings to hexadecimal entities?

Hii @kartik, Working with different servers with various ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
27 views
0 votes
1 answer

How to set up file permissions for Laravel?

Hello @kartik, The permissions for the storage and vendor folders should stay ...READ MORE

Apr 20 in PHP by I Navin
• 220 points
30 views
0 votes
1 answer

How to Debug Variables like in PHP var_dump()?

Hello @kartik, Try out with the Smarty Session: {$smarty.session|@debug_print_var} or {$smarty.session|@print_r} To ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
26 views
0 votes
1 answer

How to order results with findBy() in Doctrine

Hii @kartik, Try out this code $ens = $em->getRepository('AcmeBinBundle:Marks')               ...READ MORE

Apr 20 in PHP by Niroj
• 21,680 points
25 views
0 votes
1 answer

Error:SSL certificate error: unable to get local issuer certificate

Hii, If you don't have access to php.ini, adding ...READ MORE

Apr 15 in PHP by Niroj
• 21,680 points
63 views
0 votes
1 answer

How to merge two arrays while keeping keys instead of reindexing?

Hello, Considering that you have $replaced = array('1' => ...READ MORE

Apr 15 in PHP by Niroj
• 21,680 points
52 views
0 votes
1 answer

How to get current route in Symfony 2?

Hii,  The easiest way to do this: class MyController ...READ MORE

Apr 15 in PHP by Niroj
• 21,680 points
37 views
0 votes
1 answer

How to clear APC cache entries?

Hello @kartik, You can use the PHP function ...READ MORE

Apr 15 in PHP by Niroj
• 21,680 points
21 views
0 votes
1 answer

How to implement a callback in PHP?

Hello, Implementation of a callback is done like ...READ MORE

Apr 15 in PHP by Niroj
• 21,680 points
18 views
0 votes
1 answer

What is the best way to allow plugins for a PHP application?

Hello @kartik, I've used, it's an attempt to ...READ MORE

Apr 15 in PHP by Niroj
• 21,680 points
14 views
0 votes
1 answer

How to get the client IP address in PHP ?

Hello, Here is a code sample of a good ...READ MORE

Apr 8 in PHP by Niroj
• 21,680 points
180 views
0 votes
1 answer

Error:Lost connection to MySQL server at 'reading initial communication packet', system?

Hello, You have to follow the below steps: bind-address ...READ MORE

Apr 9 in PHP by Niroj
• 21,680 points
132 views
0 votes
1 answer

How can I get ID of the last updated row in MySQL?

Hello @kartik, Suppose, item_id is an integer identity column in items table ...READ MORE

Apr 9 in PHP by Niroj
• 21,680 points
56 views
0 votes
1 answer

How to log in to phpMyAdmin with WAMP?

Hello @kartik,  Try-Username: root Password: (No password set). Sometimes it doesn't ...READ MORE

Apr 9 in PHP by Niroj
• 21,680 points
47 views
0 votes
1 answer

How to include a PHP variable inside a MySQL statement?

Hii, You can try this: $query="SELECT * FROM CountryInfo ...READ MORE

Apr 9 in PHP by Niroj
• 21,680 points
42 views
0 votes
1 answer

I am trying to run following command But I end up with an error :

Hello Nishant, You are getting this error because your ...READ MORE

Apr 9 in PHP by Niroj
• 21,680 points
30 views
0 votes
1 answer

What is the use of the @ symbol in PHP?

Hello @kartik, The @ symbol is the error control operator ("silence" or "shut-up" ...READ MORE

Apr 8 in PHP by Niroj
• 21,680 points
37 views
0 votes
1 answer

SQL injection that gets around mysql_real_escape_string()?

Hello @kartik, Consider the following query: $iId = mysql_real_escape_string("1 ...READ MORE

Apr 8 in PHP by Niroj
• 21,680 points
29 views
0 votes
1 answer

How to pass an array within a query string?

Hello, Submitting multi-value form fields, i.e. submitting arrays ...READ MORE

Apr 7 in PHP by Niroj
• 21,680 points
61 views
0 votes
1 answer

How to get xdebug var_dump to show full object/array?

Hello. These are configurable variables in php.ini: ; with ...READ MORE

Apr 7 in PHP by Niroj
• 21,680 points
43 views
0 votes
1 answer

How to override trait function and call it from the overridden function?

Hello, If the class implements the method directly, ...READ MORE

Apr 7 in PHP by Niroj
• 21,680 points
31 views
0 votes
1 answer

How can I handle the warning of file_get_contents() function in PHP?

Hello @kartik, This is fairly simple: if (!$data = ...READ MORE

Apr 7 in PHP by Niroj
• 21,680 points
37 views
0 votes
0 answers

What are the differences in die() and exit() in PHP?

I think both have the same functionality, ...READ MORE

Apr 8 in PHP by kartik
• 10,760 points
23 views