Hi

I am trying to upload an entire directory to a server, using a script i found on the net... as a noob to php I've come unstuck on what I suspect is a basic bit of code...
I need to specify a directory on my local pc as the root folder for the upload to happen...

here follows the code...
with my attempt... the path im looking for is $srcroot

// set the various variables
    $ftproot = "/public_html/test/";
    $srcroot = "C:\Documents and Settings\WinXP User\My Documents\ ";        
    $srcrela = "testpictures/";

You need to escape "\" by adding another "\". Eg.

<?php
$path="C:\\Documents and Settings\\User 123\\My Documents\\";
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.