我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

php:file_put_contents错误

I'm using file put content to save my image to the server, but I get an error and the image is not saved .

I am getting the base64 string from android app, I decode it and pass it on for saving. My php script is in this location (example):

www.aaa.com/test

I want to save the photos to:

www.aaa.com/test/photos

What I have:

$name = "image123.png";
$data = base64_decode($fldPostPhoto);
file_put_contents("photos/".$name,$data);

近期文章

  • Bootstrap选项卡面板处于活动状态
  • 从PHP页面提交表单时不调用Ajax
  • 日历预订
  • 如何在PHP中缩短URL?
  • 尝试使用PHP与Bluehost创建联系表单[重复]
  • 使用基于主题的imap_search显示消息
  • 如何修复500错误?
  • socket.io和redis,节点js不能在宅基流浪盒上的laravel中工作
  • move_uploaded_file不适用于会话中保存的文件而不显示任何错误消息
  • PHPExcel克隆工作表 - 有效使用内存
  • 自定义窗口小部件窗体:无法更改任何输入字段的值
  • Laravel身份验证无法在嵌套控制器上识别
  • 适用于PHP的嵌入式脚本引擎
  • mysql查询问题,在返回多行时查找单行
  • 在类函数中没有运行mysqli_query,但它在类外部正常工作
  • Laravel中的动态数据库连接
  • 提交Web表单时是设备吗?
  • 邮件功能和smtp在窗口服务器2008上不起作用
  • Codeigniter ajax请求不起作用
  • 选中时禁用禁用输入字段

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华