|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-01 14:31 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
hi to all.. in a previous message you tell me to use "select ... into outfile" query in order to get database result into a file! I try this query from MySQL with success BUT... i do not succeed anything (or get the result file) when launching it from a PHP3 script in the example below we do succeed to write a text file in /home/ftp/pub (so the user rights seems to be good (our http apache demon runs under httpd user and group , and /home/ftp/pub belong to httpd group with 775 permissions) BUT... the same thing from a PHP3 script launching a query select into outfile /home/ftp/pub " no not succeed (the file is not created... and i really don't know why!! what can be wrong??? thanks for your help ---------- <?php $base="PNOC"; $userpnoc="httpd"; $host="localhost"; $passwd="*****"; $connect=mysql_connect($host,$userpnoc,$passwd); $fd=fopen("/home/ftp/pub/titi.txt","w"); /* file is created !!!!*/ $query="select * from mission into outfile \"/home/ftp/pub/bidon\";"; /* file bidon is NOT created !!! */ $result=mysql_db_query($base, $query); -------------