PHP script to extract zip on whm server -
i creating script creates subdomain on whm server , uploads zip through ftp it. part working fine , newly created subdomain functions , file want gets transfered it.
all need unzip file. 1 can using cpanel's built in file manager need done in own script. there way invoke cpanel's zip extraction functionality from script?
using php's ziparchive problem because it's open() , extractto() functions cannot take url argument , zip file talking not located in place can access without url. here's why:
while logged in cpanel_user_1 created subdomain belongs it's newly created user (let's cpanel_user_2). cannot open files in cpanel_user_2's public_html folder because that's way cpanel works - don't have access cpanel user's files. if ziparhive work url do:
$zip = new ziparchive; $zip->open('http://subdomain.domain.com/some_zip.zip') $zip->extractto('http://subdomain.domain.com/folder/some_zip.zip'); $zip->close(); but doesn't... , don't have access actual file path of file.
Comments
Post a Comment