256 Kilobytes

Server-Side Comments

Type CommentsResponses to top-level threads. Category Server-SideDiscuss server-side development, such as PHP. Tag All

Profile Photo - Hash Brown

Reply to Master up your courage

Comments in Server-Side | By Hash Brown

Published

Profile Photo - Hash Brown

I agree with this man Anton and we must...

MoreI agree with this man Anton and we must all use DEEP THOUGHT and PONDER our way in this world
🗨 1
🐏 0
👁 11
Profile Photo - Default

Reply to How to Parse a User Agent in PHP with Minimal Effort

Comments in Server-Side | By bboychev

Published

Profile Photo - Default

In my opinion you need to put the "Human...

MoreIn my opinion you need to put the "Humans / Regular Users" ifs at the end after the bots and the rest, otherwise for example current Googlebot user ag...
🗨 1
🐏 1
👁 30
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

d

Mored
🗨 1
🐏 0
👁 5
Profile Photo - Default

Reply to Best PHP Frameworks

Comments in Server-Side | By monicageller3691

Published

Profile Photo - Default

PHP is widely used language in recent da...

MorePHP is widely used language in recent days. It is server based scripting language for web development. These frameworks helps. Thanks for sharing.
🗨 3
🐏 2
👁 1
Profile Photo - August R. Garcia

Reply to Best PHP Frameworks

Comments in Server-Side | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Based on the data shown below, the answe...

MoreBased on the data shown below, the answer is basically that Laravel is the most popular and clearly has the largest community around ir right now. Cle...
🗨 3
🐏 2
👁 1
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Ahrefs now shows/lists data related to t...

MoreAhrefs now shows/lists data related to the rel="ugc" and rel="sponosored" attribute values. See newly added cover image to this post.
🗨 1
🐏 1
👁 113
Profile Photo - Univa
Profile Photo - Univa

When we use json_decode();, we get an ob...

MoreWhen we use json_decode();, we get an object of type stdClass as return type.  1. Cast the object to array. This can be achieved as follows....
🗨 1
🐏 0
👁 377
Profile Photo - Univa

Reply to [PHP] Push to associative array?

Comments in Server-Side | By Univa

Published

Profile Photo - Univa

It will merge two arrays and combine the...

MoreIt will merge two arrays and combine their items in a single array. Example Code - $existing_array = array('a'=>'b', 'b'=>'c'); $new_arra...
🗨 1
🐏 0
👁 311
Profile Photo - Default

Reply to Fixing "linting is disabled for this query because it exceeds the maximum length PHPmyadmin?"

Comments in Server-Side | By JJJJJ

Published | Last Update

Profile Photo - Default

Linting is a term for a program to ...

MoreLinting is a term for a program to analyze code for potential errors. This just means the query can't be validated but IIRC you can still ru...
🗨 1
🐏 0
👁 2,523
Profile Photo - Univa
Profile Photo - Univa

MoreLog in as root in phpMyAdmin Create a database called PHPMyAdmin Create a user called pma and set the "host" to the hostname or IP address...
🗨 1
🐏 0
👁 376
Profile Photo - Some Guy
Profile Photo - Some Guy

Also, this tool is fairly useful:

MoreAlso, this tool is fairly useful: https://incarnate.github.io/curl-to-php/
🗨 1
🐏 0
👁 333
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

This line:

MoreThis line: unset( $recent($key) );  Should be: unset( $recent[$key] ); 
🗨 2
🐏 0
👁 362
Profile Photo - Zhaybib

Reply to PHP Fatal error: Can't use function return value in write context in [Some File Path]

Comments in Server-Side | By Zhaybib

Published | Last Update

Profile Photo - Zhaybib

Since you are having a PHP error and you...

MoreSince you are having a PHP error and you want to know how to solve this, check out Stack Overflow's solution right here https://stackoverflow.co...
🗨 2
🐏 0
👁 363
Profile Photo - Univa
Profile Photo - Univa

Some of the program that may be using Po...

MoreSome of the program that may be using Port 80: Skype: Skype uses port 80/443 by default.  Go to tools >options > advanced >conn...
🗨 1
🐏 0
👁 382
Profile Photo - August R. Garcia

Reply to How to write "correct horse battery staple" passwords in PHP?

Comments in Server-Side | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Morefunction correct_horse_battery_staple() { // The file that contains the words you want to use $f_contents = file(public_path() ....
🗨 1
🐏 0
👁 359
Profile Photo - August R. Garcia

Reply to [Dreamhost] Increase PHP memory limit?

Comments in Server-Side | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Also, if you're running out of memory, n...

MoreAlso, if you're running out of memory, note that for shared hosting and VPS setups, MySQL runs on a separate machine/partition from your website's fil...
🗨 2
🐏 0
👁 472
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Footnote - This post is part of a work-i...

MoreFootnote - This post is part of a work-in-progress for 256Kilobyte's patch 1.6.0. May update this post later with minor bug fixes / QOL updates to the...
🗨 1
🐏 0
👁 6
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Something like this should work:

MoreSomething like this should work: function greentext(DOMDocument $xml_doc) { // Get all P tags $nodes = $xml_doc->getElementsBy...
🗨 1
🐏 0
👁 577
Profile Photo - August R. Garcia

Reply to [PHP] Add ids to domdocument?

Comments in Server-Side | By August R. Garcia

Published

Profile Photo - August R. Garcia

There is also some code in this article...

MoreThere is also some code in this article that does this: https://www.256kilobytes.com/content/show/3104/php-how-to-configure-a-website-to-show-jump-...
🗨 2
🐏 0
👁 307
Profile Photo - August R. Garcia

Reply to [PHP] Sort associative array by value?

Comments in Server-Side | By August R. Garcia

Published

Profile Photo - August R. Garcia

PHP documentation for arsort():

MorePHP documentation for arsort(): http://php.net/manual/en/function.arsort.php Also, there are a few other array sorting options: sort() -...
🗨 2
🐏 0
👁 367
Profile Photo - August R. Garcia

Reply to How to delete a database in PHPmyadmin?

Comments in Server-Side | By August R. Garcia

Published

Profile Photo - August R. Garcia

You can also directly run these commands...

MoreYou can also directly run these commands through the PHPMyAdmin UI: SHOW DATABASES; If you need to look up the database name(s) DROP...
🗨 2
🐏 0
👁 345
Profile Photo - roxblade

Reply to How to delete a database in PHPmyadmin?

Comments in Server-Side | By roxblade

Published | Last Update

Profile Photo - roxblade

Go to your MySQL databases (through your...

MoreGo to your MySQL databases (through your cPanel, it will be usually next to or before phpMyAdmin). Here, you will see a listing of your databases. The...
🗨 2
🐏 0
👁 345
Profile Photo - roxblade

Reply to [PHP] Sort associative array by value?

Comments in Server-Side | By roxblade

Published

Profile Photo - roxblade

Use the arsort function. It will sort th...

MoreUse the arsort function. It will sort the associative array in a descending order according to the array elements value. The syntax follows this struc...
🗨 2
🐏 0
👁 367
Profile Photo - roxblade
Profile Photo - roxblade

First of all, make sure you restart Apac...

MoreFirst of all, make sure you restart Apache (server) after you have modified the php.ini. Also, ensure that the file that's causing this error to pop u...
🗨 1
🐏 0
👁 619
Profile Photo - roxblade

Reply to [PHP] Add ids to domdocument?

Comments in Server-Side | By roxblade

Published

Profile Photo - roxblade

Fairly simple. Here's the code:

MoreFairly simple. Here's the code: $dom = new DOMDocument(); $dom->loadHTML('<html><body><p>FROB</p></body></html&g...
🗨 2
🐏 0
👁 307
Profile Photo - roxblade

Reply to [PHP] sort multidimensional array by value?

Comments in Server-Side | By roxblade

Published

Profile Photo - roxblade

Before PHP 5.2, you will need to define...

MoreBefore PHP 5.2, you will need to define a custom sorting function to do that. Let's say it goes like this: function sortByOrder($a, $b) { re...
🗨 1
🐏 0
👁 376
Profile Photo - roxblade
Profile Photo - roxblade

This is most probably happening because...

MoreThis is most probably happening because DNS lookup is failing. If you're particularly sure that the server is accessible and you can open it otherwise...
🗨 1
🐏 0
👁 339
Profile Photo - roxblade

Reply to [PHP] Specify timezone in a date object?

Comments in Server-Side | By roxblade

Published

Profile Photo - roxblade

Use the setTimezone function for this.<b...

MoreUse the setTimezone function for this. This works from PHP 5 up until the latest version. DateTime::setTimezone -- date_timezone_set This w...
🗨 1
🐏 0
👁 310
Profile Photo - roxblade
Profile Photo - roxblade

It's simple. Add the following code to y...

MoreIt's simple. Add the following code to your .htaccess file and all .index.php will be removed from your URLs. <IfModule mod_rewrite.c>...
🗨 1
🐏 0
👁 334
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Note that if you're talking about an...

MoreNote that if you're talking about an attribute, by default htmlspecialchars() does not encode the single quote ( ' ) chara...
🗨 2
🐏 0
👁 354