select * From posts where content like '%ccaa.51cema%'
update posts set content=REPLACE(content,'ccaa','xue') where content like '%ccaa.51cema%'
select * from posts where content like '%http://127.0.0.1:9998/storage/attachments%'
将所有http://127.0.0.1:9998/storage/attachments替换成/storage/attachments 这样图片可以根不同域名进行加载
update posts set content=REPLACE(content,'http://127.0.0.1:9998/storage/attachments','/storage/attachments') where content like '%http://127.0.0.1:9998/storage/attachments%'

large_client_header_buffers 4 10m; # 读取大型客户端请求头的缓冲区的最大数量和大小
client_max_body_size 300m; #设置nginx能处理的最大请求主体大小。
client_body_buffer_size 20m; #请求主体的缓冲区大小。
select * From posts where content like '%ccaa.51cema%'
update posts set content=REPLACE(content,'ccaa','xue') where content like '%ccaa.51cema%'
select * from posts where content like '%http://127.0.0.1:9998/storage/attachments%'
将所有http://127.0.0.1:9998/storage/attachments替换成/storage/attachments 这样图片可以根不同域名进行加载
update posts set content=REPLACE(content,'http://127.0.0.1:9998/storage/attachments','/storage/attachments') where content like '%http://127.0.0.1:9998/storage/attachments%'
文件上传大小限制
Nginx配置
图片
large_client_header_buffers 4 10m; # 读取大型客户端请求头的缓冲区的最大数量和大小
client_max_body_size 300m; #设置nginx能处理的最大请求主体大小。
client_body_buffer_size 20m; #请求主体的缓冲区大小。
PHP配置
使用 php --ini 命令查看 php.ini 的位置,修改其中的配置项
max_execution_time = 0 //0表示该页最久执行时间没有限制,单位:秒
post_max_size = 150M //设定POST数据所允许的最大大小
upload_max_filesize = 150M //表示所上传的文件的最大大小
max_execution_time = 600
max_input_time = 600
memory_limit = 32m
file_uploads = on
upload_tmp_dir = /tmp
upload_max_filesize = 32m
post_max_size = 32m
不按以上参数配置会出现如图所示错误

