|
Posted by Paul on 04/02/07 18:23
>| Steve - this seems to be working on files EXCEPT those deeper in
> | directories, for example, files within:
> | /site/html/Quickform/
> |
> | throw the error:
> | "Warning: main(HTML/Common.php) [function.main]: failed to open stream:
> No
> | such file or directory in C:\site\HTML\QuickForm\element.php on line 22"
> |
> | Line 22 is:
> | require_once('HTML/Common.php');
> |
> | There are also directoryies under /site/html/Quickform/, like
> | /site/html/Quickform/Renderer/
> | /site/html/Quickform/Rules/
> |
> | So I need it work for those as well.
> |
> | Any ideas? I think I/you/we am very close!
>
> yes. as someone else pointed out, most systems on which you place this web
> application are case-sensitive. as a rule for myself, i always lower-case
> all directory and file names. as you have probably guessed by now, i do
> things very methodically...so much so that i type using lower case. ;^) i
> only use proper casing when i do formal writing.
>
> anyway, your problem now stems on the fact that you are requiring
> HTML/Common.php, yet on your file system, you only have html/common.php.
> make sense? in addition, your line 22 should be:
>
> require_once $relativePath . 'html/common.php'
>
> in order to make use of relative.path.php. also, i am assuming that your
> web
> root is /site.
>
> have you also thought about using something similar to site.cfg.php in
> order
> to define your directory structure literally, such that your scripts refer
> to paths via variables?
I can actually put the following in /site/pages/page1.php and it works fine:
require_once $relativePath.'HTML/Common.php';
But when put in:
/site/html/Quickform/Element.php
it throws:
"Notice: Undefined variable: relativePath in
C:\...\site\HTML\QuickForm\element.php on line 22"
Despite the auto_prepend_file working in that file - I have checked.
I think I need help making your code snippet go deeper in the directory
settings. Instead of going up one level, it needs to go up another level
but that will vary depending on where the file. Does that make sense?
Here's what's happening. When you open:
/site/pages/page1.php
it calls:
/site/HTML/Quickform.php properly
That file calls:
/site/HTML/Quickform/elements.php, and THAT is where the error iccurs. The
%relativepath is not defined in /site/HTML/Quickform/elements.php despite
the relative.path.php being included in that file. I can only conclude that
the dept to which the directory structure is being walked up or down is not
enough.
Any ideas? Your help is MUCH appreciated!
Navigation:
[Reply to this message]
|