Double click and run the Php script on mac

Try this (for mac),

  1. Open terminal
  2. cd to folder
  3. Start php server – php -S 127.0.0.1:8000
  4. Open browser and enter – http://localhost:8000/file-name.php
Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)