require_once、define在windows和linux下用法区别

来源:互联网 发布:淘宝卖毛衣好的店 编辑:程序博客网 时间:2024/06/07 02:17

require_once('../../config.php')、define(DB_USER, 'root')语句在linux下很正常,结果移到Windows下发现报错,网上找了半天也没解决,后来才发现require_once在Windows下不需要括号,空格即可,define的定义字符串要加引号

Linux:require_once('../../config.php');

              define(DB_USER, 'root');

Windows:require_once '../../config.php';

                     define('DB_USER', 'root');


 

原创粉丝点击