php symfony cc在后端?

Gry*_*hea 0 php apache symfony1

有可能使 php symfony cc

在我的页面上的backend.php?如果有,怎么样?我希望在我的后端页面清除缓存,而不是去服务器

Nan*_*com 5

你总是可以调用system()函数:

system("php symfony cc");
Run Code Online (Sandbox Code Playgroud)

但我确信有更好的方法......实际上,你必须能够调用清除代码中缓存的函数,它在类sfCacheClearTask中:https://github.com/symfony/symfony1/blob/1.4 /lib/task/cache/sfCacheClearTask.class.php

我认为这应该有效:

$command = new sfCommandApplicationTask();
$command->runTask('cache:clear');
Run Code Online (Sandbox Code Playgroud)