首页 WordPress函数大全 insert_with_markers()

insert_with_markers()

2020-05-02 / 3243阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

insert_with_markers( string $filename, string $marker, array|string $insertion )

Inserts an array of strings into a file (.htaccess), placing it between BEGIN and END markers.

描述

Replaces existing marked info. Retains surrounding data. Creates file if none exists.

参数

$filename

(string)
(Required)
Filename to alter.

$marker

(string)
(Required)
The marker to alter.

$insertion

(array|string)
(Required)
The new content to insert.

返回

(bool) True on write success, false on failure.

大家谈论
    我的见解