我在Joomla&amp ;;中使用MySql OUTFILE命令命令不能使用Joomla路径常量,如JPATH_SITE,JPATH_ROOT或JURI :: root()。
命令正在使用正确的路径执行以下查询:
$filename = 'c:/Temp/users.csv';
$query = 'SELECT * INTO OUTFILE "'.$filename.'"
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY \'"\'
ESCAPED BY "\\\"
LINES TERMINATED BY "\n"
FROM jos_users';
以下是我在Joomla中使用的查询,该查询无效:
$filename = JPATH_SITE.DS.'users.csv';
$query = 'SELECT * INTO OUTFILE "'.$filename.'"
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY \'"\'
ESCAPED BY "\\\"
LINES TERMINATED BY "\n"
FROM jos_users';
请帮帮我。 感谢。