尝试项目:https://github.com/yearofmoo/angularjs-seed-repo
环境:
Windows 7 64位
NodeJS v 0.10.24
量角器v 0.16.1
grunt v0.4.2
grunt-cli v0.1.11
笔记:
对于selenium,根据[Julie的帖子] [1],install_selenium_standalone已经在12/2/13左右被webdriver-manager二进制替换.这似乎与这个问题有关.
此外,必须在项目目录中安装git,并且必须在Windows中使用Git Bash运行npm install.
Git Bash出错:
$ grunt test:e2e --debug
运行"connect:testserver"(连接)任务
[D]任务源:c:\nodejs-0.10.24 \node_modules\grunt-contrib-connect\tasks\conn ect.js开始连接web服务器在127.0.0.1:9999.
运行"量角器:singlerun"(量角器)任务
[D]任务来源:c:\nodejs-0.10.24 \node_modules\grunt-protractor-runner\tasks\pr otractor_runner.js启动selenium独立服务器...
events.js:72
throw er; //未处理的'错误'事件
^
错误: 在Process.ChildProcess._handle.onexit(child_process.js:771:34)的
errnoException(child_process.js:980:11)
处生成ENOENT
>致命错误:量角器退出代码:8
通常,我希望输入一个URL,然后将该URL的图像导入数据库.
这里有一些代码让我很接近,但欢迎使用替代品.
如果我尝试将$ image作为BLOB存储到数据库中,则会出现错误.
<?php
class wSpider
{
var $ch; /// going to used to hold our cURL instance
var $html; /// used to hold resultant html data
var $binary; /// used for binary transfers
var $url; /// used to hold the url to be downloaded
function wSpider()
{
$this->html = "http:/";
$this->binary = 0;
$this->url = "";
}
function fetchPage($url)
{
$this->url = $url;
if (isset($this->url)) {
$this->ch = curl_init(); /// open a cURL instance
curl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, 1); …Run Code Online (Sandbox Code Playgroud)