|
Posted by Steve on 04/16/07 17:45
"FFMG" <FFMG.2p57d9@no-mx.httppoint.com> wrote in message
news:FFMG.2p57d9@no-mx.httppoint.com...
|
| tasteless;60646 Wrote:
| > Hi guys,
| >
| > I need really hard questions (about 10) about PHP programming (some of
| > elements OOP as well, but no MySQL questions - this is different
| > part),
| > this questions needs to be very hard, but the experienced senior PHP
| > developer should answered on it.
| >
| > I've already searched in google and google groups archive but without
| > any good results. So could anybody help me giving some link or sending
| > some stuff to me ?
| >
| > Thanks and regards - Peter.
| >
| > PS. It's about the bet with one of my friend :)
| >
| > --
| > Silly is a state of Mind, Stupid is a way of Life.
|
| Here is one,
|
| If I _do not_ want to suppress warnings in include(...), (in other word
| not use @include(...))
| Why is file_exists(...) alone not a good option.
| How would you check if a file exists for inclusion.
google is great...file_exists seems to be tied with open_basedir limits in
php.ini.
This error message indicates that the path to your home directory is not
included in allowed paths specified by open_basedir parameter in php.ini
file. open_basedir limits the files that can be opened by PHP to the
specified directory and all included subdirectories. Thus, PHP script is
trying to read a file which is not found in the specified path and the error
occurs.
One way to solve the problem is to include your home directory path in the
path list that PHP is allowed to open, specified by open_basedir. For
example, the following setting indicates that PHP script can read files
located in /home/vhosts, /usr/share/php/pear/ and /tmp folders:
open_basedir =/home/vhosts:/usr/share/php/pear/:/tmp
Another solution is to disable open_basedir restriction and allow open
access to all directories. By default all files are allowed to be opened by
PHP script.
Navigation:
[Reply to this message]
|