mysql - PHP 5.0: Call to undefined function mysql_connect() -


this question has answer here:

i have installed php 7.0.15. , project working on, has php version of 5.0. how can run php 5.0 in php 7.0.15.i have other project working on php 7.0.15. can't install php 5.0. there way solve issue?

any great.

thank you.

here's can try: can re-write functions using mysqli_*.

this starting point!

<?php     if(!function_exists('mysql_connect') && function_exists('mysqli_connect'))     {         $_globals["\0mysql"] = array();          function mysql_connect($servername, $username, $password)         {             $_globals["\0mysql"][] = mysqli_connect($servername, $username, $password);         }          function mysql_select_db($database_name)         {             return mysqli_select_db(end($_globals["\0mysql"]), $database_name);         }          [...]     } 

this proof-of-concept , meant exemplify mean.
i'm not sure if wrote this, , google-fu terrible.

also, don't forget define constants use mysql_*.

hope helps.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -