the directory for cakephp in xml generation
I uploaded xml file in my cakephp in img/files directory
app->webroot->files->Myfile.xml
and I want to call it from my controller like 开发者_Python百科this
$file = "/files/Myfile.xml";
I am not sure is this the correct path from the controller ot not of course controller is in app->controllers->my_controller
thanks
Use one of the CakePHP Core Configuration Constants.
WWW_ROOT
for example:
$file = WWW_ROOT . "files/MyFiles.xml";
精彩评论