paths
Posted: Thu Feb 02, 2006 6:51 am
I'm trying to integrate an image processing function into FCKEditor (a web text editor for a CMS).
I've found the relevant file which is 9 levels down from the Server doc root. Its a class for uploading files, and I've added the image processing functions in here, and adapted the method which deals with the actual uploading so it should call these functions.
The final part of my image processing calls imagejpeg() to save the file. I want this to be saved in the default FCKEditor folder so it will show up in the thumbnail browser. This is 3 levels down from the server doc root.
I've tried using $_SERVER['document_root'] etc to set the absolute path for the image to be saved to, but that hasn't seemed to work, and I haven't been able to find which file is calling the Upload class to see if that is affecting what the relative path to the destination folder would be. So I guess I wouldn't be able to chdir() to the directory until I know that either.
Its pretty hard to debug this code when FCK uses Javascript to call php files and only seems to output xml responses.
Does the relative path to a directory change if a file is included from a higher or lower level? (I'm guessing yes)
I've found the relevant file which is 9 levels down from the Server doc root. Its a class for uploading files, and I've added the image processing functions in here, and adapted the method which deals with the actual uploading so it should call these functions.
The final part of my image processing calls imagejpeg() to save the file. I want this to be saved in the default FCKEditor folder so it will show up in the thumbnail browser. This is 3 levels down from the server doc root.
I've tried using $_SERVER['document_root'] etc to set the absolute path for the image to be saved to, but that hasn't seemed to work, and I haven't been able to find which file is calling the Upload class to see if that is affecting what the relative path to the destination folder would be. So I guess I wouldn't be able to chdir() to the directory until I know that either.
Its pretty hard to debug this code when FCK uses Javascript to call php files and only seems to output xml responses.
Does the relative path to a directory change if a file is included from a higher or lower level? (I'm guessing yes)