2012-10-12 5 views
1

은 내가 템플릿 파일을 가진 내가cakephp 테마에 swf 파일을 추가하는 방법은 무엇입니까?

swfobject.embedSWF("cu3er.swf", "cu3er-container", "960", "400", "9",   "expressInstall.swf", flashvars, attributes); 

나에게 도움을 주시기 바랍니다 PHP 코드들에이 파일을 변경해야 할 것 같아요 그래서 메인 페이지에 대한 cu3er 슬라이더를 포함하는 내 CakePHP의 프로젝트에 대한 테마를 만드는 중이라서 나는이 있지만, 그런 다음 당신이 거기에서 원하는 무엇이든, 테마의 경로를 얻기 위해 앱 :: themePath ($ 테마)를 사용할 수 있습니다

swfobject.embedSWF("<? print $this->webroot . 'swf/cu3er.swf'?>, "cu3er-container", "960", "400", "9", "<? print $this->webroot . 'swf/expressInstall.swf'?>", flashvars, attributes); 

답변

0

작동하지 않음을 시도했다.

그래서에서 파일 :

app/views/themed/my_theme/webroot/swf/my_flash_file.swf 

을 통해 잡고 될 수 있습니다 :

App::themePath('my_theme').'webroot'.DS.'swf'.DS.'my_flash_file.swf'; 
+0

하이 Nirav Ranpara 나는이 시도하지만이 내 코드에 이것을 추가 한 경우 내가 을 찾는 것이 아니다 이 같은 HTML 출력을 얻을 것입니다 swfobject.embedSWF (","cu3er ","960 ","400 ","9 "," webroot. 'swf/expressInstall.swf'?> ", flashvars, attributes); swfobject.embedSWF ("/ var/www/stage4/app /보기/테마/MyTheme/webroot/swf/cu3er.swf,"cu3er- 컨테이너 ","960 ","400 ","9 ","/ stage4 /swf/expressInstall.swf ", flashvars, attributes); /var/www/stage4/app/webroot/swf를 가져오고 싶습니다. – sudeeprds

관련 문제