Messed Up Drupal Site, truncated all cache, menu_router, registry_file and now I can't access site
Best thing is to restore it from a backup to make it work.

If you want to fix it, replicate the site from a back up (db and files).
Then truncate tables one by one to see which one is causing the problem (It should be menu_router).

Truncate first all cache table and check
Truncate menu_router and check
Truncate registry_file and check.

About the code you did, try to remove registry_rebuild from your code.
Create a file fix.php and paste this code

&lt;?php
error_reporting(E_ALL);
define('DRUPAL_ROOT', getcwd());
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

menu_rebuild();


save it into your drupal root and visit mysite.com/fix.php .