Error: Call to undefined function
Hi, just starting out with PHP, have watched some tutorials concerning functions and am using cartweaver to create an internet store. I'm using a template and customsing it.
When I load the site index page I get this error:
Fatal error: Call to undefined function expandPath() in C:\xampp\htdocs\brmstest\cw4\cwapp\func\cw-func-product.php on line 400
Line 400 of cw-func-product.php is:
$imageDirPath = expandPath(CWtrailingChar($_ENV["application.cw"]["appCWContentDir"],"remove") . CWtrailingChar(CWleadingChar($_ENV["application.cw"]["appImagesDir"])) . CWtrailingChar(CWleadingChar($imageTypeDir,"remove")));Where should I find the function expand path? I don't know if it exists or does it just defining in this file in particular?
If I need to define the function, where and how do I do that?
Thanks in advance for any help. I hope my question isn't too stupid.
This is a guess gathoni and there is no way I can find the answer for you. Normally, functions are all lumped together in a single file someplace. They are loaded to a page with the require ("function_file_name") at the top of the php. This maybe commented out or was erased. If this don't work for you you can open each file you have and search for
I know that's way too little, but it's the best I have.
thanks i found the file with the function actually when i delete the call to that function i get another undefined error message for a function from the same file. I cannot see anywhere 'require' there are comments on file dependencies, and it does mention a file which needs to be called, but the file where the relevant functions are is not mentioned
gathoni I went to Cartweaver Community Forums and searched on expandPath() This page came up http://forums.cartweaver.com/topic/warning-opendir. It doesn't give clear answers but tells me there is a place you can go to get answers. And that the expandPath() function returns the actual file paths on the server and therefore really necessary.
You might also want to try the Lynda.com tutorial for setting up an ecommerce site with dreamweaver and cartweaver. It will cost you some money.
|All times are GMT +1. The time now is 07:34 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.