Hey there
I've developed some script to upload a file to a directory on my server and forward the file data to MySQL, once the transfer is successful a success.php page appears, in it contains the script that calls on the database then proceeds to write the xml.
the problem i'm having is that the PHP is writing a absolute path in the xml when i need it to write a relative one, eg.
i need this
<gallery>
<imageurl>images/image1.jpg</imageurl>
</gallery>
instead of this (what i'm currently getting)
<gallery>
<imageurl>/var/www/vhosts/oconnellconstruction/images/image1.jpg</imageurl>
</gallery>
This is the part of the PHP that writes my xml
$xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n\n";
$xml .= "<gallery>\n\n";
while ($dat = mysql_fetch_array($dbresult)) {
$xml .= "\t<imageurl>".Display($dat['pic'])."</imageurl>\t\n";
}
$xml .= '</gallery>';
thank you