【问题标题】:How to convert this string check from PHP into AS3?如何将此字符串检查从 PHP 转换为 AS3?
【发布时间】:2012-03-22 14:33:25
【问题描述】:

大家好,我不知道如何在 AS3 中写这个,但基本上我需要检查一些输入的字符串。如果他们的名字前面有 BTS 或 TS,那么就这样做,否则什么都不做。

PHP 脚本:

$theid =$this->uri->segment(3);


if(substr($theid,0,3) =='BTS'){
    $theid = str_replace('BTS', 'TS', $theid);
}
$video =  $this->ecx_model->custom_search_small($theid,'any','reference_id');

【问题讨论】:

    标签: php string actionscript-3 flash substring


    【解决方案1】:
    if (!theid.indexOf("BTS")) theid = theid.replace(/BTS/g, "TS");
    

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-12-11
      • 2011-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-18
      • 2015-05-10
      相关资源
      最近更新 更多