doucong1992 2015-11-27 08:13
浏览 309

PHP使用exec运行curl

I tried running a curl command in php using exec method, it worked well in my Linux server, but not working in my Windows machine, I checked my PHP configuration file too, curl is enabled there. What could be the issue that it is not working ?

My command is (one used for Linux - this one ran succesfully there) 'curl -u admin:geoserver -XPUT -H "Content-type:image/tiff" --data-binary @/opt/lampp/htdocs/PDAN_Dev/Admin/uploads/tif/'.$data_set_name.'.tif http://localhost:8080/geoedge/rest/workspaces/geoedge/coveragestores/'.$data_set_name.'/file.geotiff'

The one I ran in Windows

exec("curl -u admin:geoserver -XPUT -H Content-type:image/tiff --data-binary C:/Users/Developer/Desktop/geoedge-test12.tif http://107.167.186.125:8080/geoedge/rest/workspaces/geoedge/coverageStores/geoedge-test13/file.geotiff")

When I ran it in the command prompt it gives me no output

  • 写回答

2条回答 默认 最新

  • douxunnian0423 2015-11-27 08:17
    关注

    It means that you have not installed curl on your windows machine. PHP curl is not same thing as machine installed curl. When you are checking php configuration, it shows modules installed for php, not for machine.

    评论

报告相同问题?

悬赏问题

  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏