空间的帮助文件的HTML内容,获得具有在其目录名称
我在得到我的文件的HTML内容如果目录/文件夹名称中有空格的问题。
我使用curl抢HTML内容。这里是我访问抢HTML代码
http://dev24oct20part2.globalbizcloud.com/admin/content/module_templates/templates/products/all_prods/Product temP/index.html
链路的样品正如你可以看到有目录包含空格我的index.html,这导致了错误,并且不允许我抓取内容。
/Product temP/index.html
这里是我的代码:
$template = $this->mod_template_link.$this->module_category.'/'.$this->module_unique_key.'/'.$this->module_template.'/index.html';
//value of this variable is the link above..
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $template);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
return $this->translate_template($contents);
是否有存在的文件夹名称没有空格,它工作正常。
任何意见或建议,将不胜感激..
在此先感谢。
有什么错误信息的空间?也显示你的代码。 – ethrbunny
出现的错误是一个HTTP错误400错误的请求.. –