-2

when I load this in my browser this is the error that I receive but I cant seem to find out what is wrong with it. Does anyone have any suggestions on how to solve this issue.

<?php


define('DOCUMENT',"C:/XAMPP/htdocs/test/");
define('DOC_ROOT' , DOCUMENT);
define('DS' , "/"); 
define('INCLUDES', DOC_ROOT . 'includes'. DS);

define('MYSQL_DIR' , DOC_ROOT . 'mysql' . DS  );
define('MODELS_DIR' , DOC_ROOT . 'mysql' . DS . 'models' . DS );

require_once MYSQL_DIR . 'db_connect.php';



?>

Warning: require_once(C:/XAMPP/htdocs/test/mysql/db_connect.php): failed to open stream: No such file or directory in C:\xampp\htdocs\test\defines.php on line 12

Fatal error: require_once(): Failed opening required 'C:/XAMPP/htdocs/test/mysql/db_connect.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\test\defines.php on line 12

fehmiE
  • 11
  • 4
  • you could have posted a comment under the given answer that addressed the original problem. You went ahead and edited without saying a thing. – Funk Forty Niner Jan 28 '18 at 13:19
  • because when i fixed it with the answer below it gave me a new problem so i edited the question so that people can now see the new problem that i am facing. – fehmiE Jan 28 '18 at 13:21

1 Answers1

0

The problem is you are missing a column ;, so the PHP doesn't know the line of code has ended. You can also check your code using https://phpcodechecker.com/. It's a very good and powerful website to check your PHP for errors.

<?php
define('DOCUMENT', "C:/XAMPP/htdocs/test/");
define('DOC_ROOT', DOCUMENT);
define('DS', "");
define('INCLUDES', DOC_ROOT . 'includes' . DS);

define('MYSQL_DIR', DOC_ROOT . 'mysql' . DS);
define('MODELS_DIR', DOC_ROOT . 'mysql' . DS . 'models' . DS);

require_once MYSQL_DIR . 'db_connect.php';
?>