%s could not be created, please run following command:
chmod 777 %s
then re-activate plugin.', $path, dirname($path)); if ($die) { die($error); } return $error; } /** * Returns current microtime * * @return float */ function w3_microtime() { list ($usec, $sec) = explode(" ", microtime()); return ((float) $usec + (float) $sec); } /** * Check if URL is valid * * @param string $url * @return boolean */ function w3_is_url($url) { return preg_match('~^https?://~', $url); } /** * Decodes gzip-encoded string * * @param string $data * @return string */ function w3_gzdecode($data) { $flags = ord(substr($data, 3, 1)); $headerlen = 10; $extralen = 0; if ($flags & 4) { $extralen = unpack('v', substr($data, 10, 2)); $extralen = $extralen[1]; $headerlen += 2 + $extralen; } if ($flags & 8) { $headerlen = strpos($data, chr(0), $headerlen) + 1; } if ($flags & 16) { $headerlen = strpos($data, chr(0), $headerlen) + 1; } if ($flags & 2) { $headerlen += 2; } $unpacked = gzinflate(substr($data, $headerlen)); if ($unpacked === FALSE) { $unpacked = $data; } return $unpacked; } /** * Recursive creates directory * * @param string $path * @param integer $mask * @return boolean */ function w3_mkdir($path, $mask = 0755) { $dirs = preg_split('~[\\/]+~', $path); $curr_path = ''; foreach ($dirs as $dir) { if (empty($dir)) { return false; } $curr_path .= $dir; if (! is_dir($curr_path)) { if (@mkdir($curr_path, $mask)) { @chmod($curr_path, $mask); } else { return false; } } $curr_path .= DIRECTORY_SEPARATOR; } return true; } /** * Check if content is HTML or XML * * @param string $content * @return boolean */ function w3_is_xml($content) { return (stristr($content, '