PHP file_get_contents not working on ROCKY 9

Execute this command: sudo setsebool -P httpd_can_network_connect 1 Restart web service ...

View More
  Dibaca 829 kali

Force Showing all errors and warnings in PHP

You can turn it on in the script: error_reporting(E_ALL); ini_set('display_errors', 1); ...

View More
  Dibaca 1421 kali

php - How to use $_FILES["file"]["size"]?

1mb = 1,048,576 bytes 2mb = 1,048,576x2= 2,097,152 bytes if maximum upload size 2mb  $name= $_FILES['file']['name']; $tmp_name= $_FILES['file']['tmp_name']; $size= $_FILES['file']['size']; $path= "Uploads/Files/"; if ($size < 2097152){move_uploaded_file($tmp_name, $path . $name);echo 'Uploaded!';} ...

View More
  Dibaca 1805 kali

HOW TO Install php-zip on php 5.6 on Ubuntu

Try either sudo apt-get install php-zip or sudo apt-get install php5.6-zip Then, you might have to restart your web server. sudo service apache2 restart or sudo service nginx restart If you are installing on centos or fedora OS then use yum in place of apt-get. example:- sudo yum install php-zip or sudo yum install php5.6-zip and sudo service httpd restart ...

View More
  Dibaca 1430 kali