wordpress - Zip a file using FTP/PHP

309

I have access to a wordpress theme folder directory via FTP. I want a particular folder to be ziped inside the theme folder so i can download it. What code i use?

/wp-content/themes/  - my directory to access

My theme folder name is 'vintage'

I want upload and run a php code inside /wp-content/themes/ so it makde a zip file or the folder 'vintage' located at /wp-content/themes/ can any one help me with this?

90

Answer

Solution:

It could be something like:

system('cd /path/to/htdocs/wp-content/themes/; zip -r vintage.zip ./');

People are also looking for solutions to the problem: php - Cookie names cannot contain any of the following

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.