Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

PHP

By editor , 4 October, 2016

HTML Entity Decode and Encode

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • PHP

Basic php and drupal 7 / 8 Examples

1.
$string_out = html_entity_decode($string, ENT_QUOTES, 'UTF-8')
//Do not forget ENT_QUOTES and 'UTF-8', otherwise quotes will not decodes.

By editor , 1 September, 2016

Isset() VS Empty() VS Is_null()

Tags

  • PHP
  • Code
By nuwantha , 2 July, 2016

Install PHP 5 (5.4, 5.5, 5.6) and PHP 7 on Linux

Tags

  • Server
  • Shell
  • PHP

Via PPA

Install PHP 5.4 On linux (Debian, Ubuntu, Mint ...)

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-get install -y php5

By editor , 13 June, 2016

Correct a broken HTML file or a HTML String

Tags

  • PHP
  • Code
  • Drupal 8
  • Utility

Example 1 : With DOMDocument: (Fast (0.0002 sec) but can have php warning)

By editor , 4 April, 2016

Open URL with name and password (Apache Htaccess, FTP ...)

Tags

  • Linux
  • Server
  • PHP

Examples with username and password:

https://name:pass@yourdomain.com

ftp://name:pass@yourdomain.com
​ftp://name:pass@ftp.yourdomain.com

ssh name:pass@yourdomain.com

Examples with username:

By editor , 4 April, 2016

SSL self signed / Override certificate check

Tags

  • Linux
  • Shell
  • PHP
  • SSL/TLS

On linux (wget)

wget --no-check-certificate https://yourdomain.com
wget --no-check-certificate https://name:pass@yourdomain.com

On Apache PHP

Pagination

  • Previous page
  • 2
PHP

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer