PHP function
filename_str
Description
Converts any string into a string which can be used as a filename.
Parameters
Coding name |
str
|
Description |
The string to be converted into a filename.
|
Position |
1
|
Type |
String(Primitive type)
|
Comments
Treats a %DOT% by default as a separating character and replaces it by the separator (%UNDERSCORE% by default) just like the path separating characters %SLASH% and %BACKSLASH%.
Therefore append the extension simply afterwards.
Examples
[%$title = $run->label() . " " . (new DateTime())->format("d-m-Y");
…
content_type("xlsx", "attachment", filename_str($title) . ".xlsx");%]
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.