Re: Need help connecting MySQL with PHP
I don't know that you can "include" a file from a folder above the htdocs folder.
I put connect_db.php and require.php in the htdocs folder, changed require.php like this.
<?php
require ( 'connect_db.php' ) ;
if( mysqli_ping( $dbc ) )
{ echo 'MySQL Server '.mysqli_get_server_info( $dbc ).' on '.mysqli_get_host_info( $dbc ) ; }
Then open
http://localhost/require.php and got the identity of the mysql server displayed.
Good luck,
Barry.
Subject
Written By
Posted
February 25, 2013 05:24PM
February 25, 2013 05:52PM
February 25, 2013 06:23PM
Re: Need help connecting MySQL with PHP
February 25, 2013 09:01PM
February 26, 2013 12:21AM
February 26, 2013 02:57PM
February 26, 2013 12:34AM
February 26, 2013 03:00PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.