I am using Localhost with UniServer, running Apache and MySQL. (There is no username or password)
I have the code new mysqli("http://localhost/us_phpmyadmin/","","","url_short");
to connect to my Localhost server, but when I try to run the code mysqli_query("INSERT INTO cut.it VALUES (NULL, $longurl, $shorturl)");
, the error php_network_getaddresses: getaddrinfo failed: No such host is known.
comes up on the page. Why is this and how can I get around it?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You have to specify the hostname of MySQL instance not a url for phpMyAdmin.
Change
to