Click to See Complete Forum and Search --> : DOMXML dump_file() issue
Brucebannor
06-05-2007, 12:34 PM
Does anyone know of why I can't dump_file() an XML object I created into a file. I can get the XML Output into a string using the dump_mem() function however dump_file() doesn't do anything. I copied and pasted the code directly from the php manual example into another site on how to use dump_file()... I tried absolute and relative pathnames, neither to any avail. Any help would be great thanks.
Gerald Bocci
06-05-2007, 02:19 PM
It may be a permission issue on the folder/file that you are trying to create. Do you get an error message? Does the function return the filesize?
Also, what server and PHP version are you using? There were problems with dump_file not working with some older versions of Apache, and possibly Windows (2000/NT) - in some cases the issue was resolved by using absolute path/filenames, in other cases the server needed to be upgraded.
Brucebannor
06-06-2007, 10:55 AM
I'm uploading them to an external server but i changed all the permissions to all rwx. - I'm using PHP 4 and Apache 1.3 and MAC OS X (employers decision not mine) - Here is my line of code for the dumpfile, which I can't get to output anything, either by use of echo or saving it into a variable =(
$doc -> dump_file($filename, false, true);