0: php_network_getaddresses: getaddrinfo failed: Name or service not known
Functions Xtscript
AiChat.Wap.Sh
str replace
Tìm tất cả các lần xuất hiện của một chuỗi con nào trong một chuỗi và thay thế chúng bằng một chuỗi khác-
[...] = optional ... = your value[var $... = ]call str_replace $subject=…;$search=…;$replace[=…]
Code ví dụ:
<!--parser:xtscript-->
# Special cases semi-colons and spaces

var $input = f o o b« a« r«

# how to assign a space for str_replace
var $this = call chr $val=32

# how to assign a ; (semi-colon) for str_replace
var $that = call chr $val=59

var $output = call str_replace $subject=$input; $search=$this ; $replace=$that
print input = $input<br />
print output = $output<hr/>

/* how to assign characters that your browser/device cannot reproduce from the keypad
this example uses « known as the left angle quote */
var $this=call urldecode $val=%C2%AB

# and ‹ known as the left single angle quote
var $that=call urldecode $val=%E2%80%B9

var $output = call str_replace $subject=$input; $search=$this ; $replace=$that
print input = $input<br />
print output = $output
<!--/parser:xtscript-->
Code đã chạy:
input = f o o b« a« r«
output = f;o;o;b«;a«;r«
input = f o o b« a« r«
output = f o o b‹ a‹ r‹