Jump to content

Path Problems


ballouta

Recommended Posts

Hi

 

I have this variable: $SaveFileDirectory = "/home/sitename/public_html/$user";

 

..then code here process the received email, it should copy the attached file to a specific directory..

at the end the code is:

 

		foreach ($attachment as $attach)	{
		WriteToFile($SaveFileDirectory . $attach['filename'], imap_base64($attach['filedata']));
		echo "Attachment found: " . $attach['filename'] . "<br><hr>";
		$myf=$attach['filename'];
	}

 

When I added $user to the above path, the file name is chaning automatically when it is copied.

e.g.: userFile.zip instaed of File.zip

 

which I don't want! How i can solve this?

 

thanks

Link to comment
Share on other sites

Hi Ginger

thanks it is working now, the slash was missed.

 

more similar question please,

 

I have this function that uncompresses a Zip file. It is working properly when I am writing the file compressed file name without a path before. e.g.: file.zip

 

When editing the path to:

$archive = new PclZip('/home/sitename/public_html/stk/$user/$myf');

or

$archive = new PclZip(/stk/$user/$myf');

the functions says that the file is missing.

Note that both the 'stk' and '$user' directory already exisit.

 

Please Help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.