I see!
Yes using an autoloader typically requires following a naming convention for
your classes (though you can get around it by defining your own naming
rules). I didn't care for it much at first, but it's nice that class names
are explicit (less confusion when you have several) and not worryin
I am following an example. Also, doesn't that require the class name
to be something like models_members?
Jim
On 10/19/2010 09:40 AM, chris h wrote:
I'm having a problem including files using Zend Framework. I have
in a controller file this
Jim why not use the Zend autoloader?
C
>
> I'm having a problem including files using Zend Framework. I have in a
> controller file this
>
>
Jim why not use the Zend autoloader?
Chris.
hi:
print_r(get_include_path());
thanks;
Best regards
惠新宸 Xinchen Hui
http://www.laruence.com/
On 10/19/2010 10:46, jim wrote:
I'm having a problem including files using Zend Framework. I have in a
controller file this
require_once "models/Member.php"; and it doesn't work ,nor does
On 1 September 2010 08:00, David Mehler wrote:
> Hello,
> I've got probably a simple question on require_once. I've got a file
> that has require_once at the top of it pulling in another file of
> functions. Later on in this file I've got another require_once
> bringing in a second file. In this s
On Thu, Jun 25, 2009 at 07:26,
ste.paole...@tiscali.it wrote:
>
> Someone can help me? Why on Mac Os there are no problems?
Start by making sure that the file is there and is readable by the
user as which you are logged in. Execute the command:
ls -l /usr/share/php/PHPUnit/Extensions
ste.paole...@tiscali.it wrote:
Hi all, I'm a php programmer an I found an anomaly.. it could be a bug.
On Mac Os all goes right but on debian enviroment there are some
problems:
Suppose I've the file /home/ste/test.php containing the
following line:
also suppose that file
/usr/share/php/PHPU
[snip] s...@debian:~$ php test.php
Warning: require_once
(PHPUnit/Extensions/Database/Testcase.php): failed to open stream: No
such file or directory in /home/ste/test.php on line 3
Fatal error:
require_once(): Failed opening required
'PHPUnit/Extensions/Database/Testcase.php'
(include_path='
Greg Bowser írta:
the above won't work, as the parser will try to interpret $CFG and
put it in the string first,
In that case, $CFG is either null, or it is indeed an object. If it is
a standard object, which I it appears to be, then a fatal error will
be thrown because there is no __tostring()
On Wed, Apr 9, 2008 at 2:40 AM, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> Richard S. Crawford írta:
>
> > Hi, everyone.
> >
> > This one's been driving me bonkers for an hour now. Anyone have any idea
> > why require_once would be dying silently in the script below?
> >
> > --
>the above won't work, as the parser will try to interpret $CFG and
put it in the string first,
In that case, $CFG is either null, or it is indeed an object. If it is
a standard object, which I it appears to be, then a fatal error will
be thrown because there is no __tostring() function. If it's
Aschwin Wesselius írta:
Richard S. Crawford wrote:
Hi, everyone.
This one's been driving me bonkers for an hour now. Anyone have any idea
why require_once would be dying silently in the script below?
$CFG->dirroot = "/home/rcrawford/public_html/tanktrun
Richard S. Crawford wrote:
Hi, everyone.
This one's been driving me bonkers for an hour now. Anyone have any idea
why require_once would be dying silently in the script below?
$CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->datar
Richard S. Crawford írta:
Hi, everyone.
This one's been driving me bonkers for an hour now. Anyone have any idea
why require_once would be dying silently in the script below?
$CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->dataro
On Tue, Apr 8, 2008 at 8:27 PM, Greg Bowser <[EMAIL PROTECTED]> wrote:
>
>
> Is it possible that something is "going wrong" between the definition
> of $CFG->foo and when you require that could cause $CFG->dirroot to be
> null? Then it would point to /lib/setup.php, which definitely
> shouldn'
Is it possible that something is "going wrong" between the definition
of $CFG->foo and when you require that could cause $CFG->dirroot to be
null? Then it would point to /lib/setup.php, which definitely
shouldn't exist and should thus throw an error, but maybe it's worth
looking into.
That woul
Richard S. Crawford wrote:
Hi, everyone.
This one's been driving me bonkers for an hour now. Anyone have any idea
why require_once would be dying silently in the script below?
$CFG->dirroot = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->datar
chris smith wrote:
> try it with a call to an undefined function e.g.:
> $foo = thisFunctionDoesNotExistAtLeastItHadBetterNot();
When this is done, the error handler doesn't get called at all, and the
script simply dies with an error message (which could be a bug as well, but
might also be consid
On Thu, 6 Jul 2006, chris smith wrote:
Have you tried this handler with something more fatal, like a missing
semi-colon or a } missmatch?
That will cause a parse error and the script won't even run.
You're right. My wrong. :-(
--
21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0
chris smith wrote:
> On 7/6/06, Martin Marques wrote:
>> On Wed, 5 Jul 2006, [EMAIL PROTECTED] wrote:
>>
>> > Hello all,
>> >
>> > According to the PHP Manual, when require or require_once failes, an
>> > E_ERROR is triggered: "require() and include() are identical in
>> every way
>> > except how
On 7/6/06, Martin Marques wrote:
On Wed, 5 Jul 2006, [EMAIL PROTECTED] wrote:
> Hello all,
>
> According to the PHP Manual, when require or require_once failes, an
> E_ERROR is triggered: "require() and include() are identical in every way
> except how they handle failure. include() produces a
On Wed, 5 Jul 2006, [EMAIL PROTECTED] wrote:
Hello all,
According to the PHP Manual, when require or require_once failes, an
E_ERROR is triggered: "require() and include() are identical in every way
except how they handle failure. include() produces a Warning while
require() results in a Fata
>> Code:
>> function default_error_handler($code, $error, $file, $line) {
>>switch ($code) {
>>case E_ERROR:
>> die ("Error: $error");
>>case E_WARNING:
>> die("Warning: $error");
>>default:
>> die("Something else entirely: $error");
>>}
>> }
>> set_error_handl
[EMAIL PROTECTED] wrote:
Hello all,
According to the PHP Manual, when require or require_once failes, an
E_ERROR is triggered: "require() and include() are identical in every way
except how they handle failure. include() produces a Warning while
require() results in a Fatal Error." (With 'Fata
> Hi
>
> this may be a stupid moment but i cant find an help on google so.i
> am including two classes in my code using the "require_once("path to
> file")" method. this works fine for the first class but when including
> the second it simply outputs the contents on to the page. I feel I mus
Forgot the Hi
>
> this may be a stupid moment but i cant find an help on google so.i
> am including two classes in my code using the "require_once("path to
> file")" method. this works fine for the first class but when including
> the second it simply outputs the contents on to the page. I
Vincent DUPONT wrote:
I need to load various php files programatically and I use require_once($file_path)
for this purpose.
My question is : is there a way to know if the file was found or not? if the file
generated an error or not?
RTFM: http://php.net/include
"require() and include() are ident
"Tyler Replogle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hey,
> i didn't quite get when you ment by that but have you tried using
> $DOCUMENT_ROOT before your path, that might help it will be something like
> this
> require_once('$DOCUMENT_ROOT/test/db.php');
> $DOCUMENT_ROOT
Hello,
Just imagine you had just copied the file you want to include and then
pasted it into the master file.
PHP does not any path translation. For example if you have the following
structure:
- /
-- a.php
-- b.php
-- /utils
c.php
d.php
Let c.php is included in a.php.
Then if you want
Curt Zirzow wrote:
* Thus wrote Sheeraz fazal ([EMAIL PROTECTED]):
Hi,
I have problem in undertanding the require_once/require/include/include_once
functionality. Php files in my project are located in different folders.
Some folders have common files for other files. And file layout is like this
did you check the online manual for those funcitons yet?
I have found the user notes to be a wealthy ressource on that matter.
This topic also came up very recently on this list so checking the
archives might solve it.
Richard
Thursday, April 22, 2004, 10:34:23 PM, thus was written:
> Hi,
> I
* Thus wrote Sheeraz fazal ([EMAIL PROTECTED]):
> Hi,
> I have problem in undertanding the require_once/require/include/include_once
> functionality. Php files in my project are located in different folders.
> Some folders have common files for other files. And file layout is like this
Include fil
hey,
i didn't quite get when you ment by that but have you tried using
$DOCUMENT_ROOT before your path, that might help it will be something like
this
require_once('$DOCUMENT_ROOT/test/db.php');
$DOCUMENT_ROOT goes to your first folder that shows up online (where your
index page is)
From: "Sh
Mike Zornek wrote:
Is it true I can't include a file up a dir like this:
require_once '../config.php';
This seems to work though:
require_once 'settings/db.php';
Strange.
Both works as long as other settings permit it - file permission and
owner, safe mode restrictions
--
PHP General Mailing
Depends on where the executed script is located ...
And it always depends on the script that is called - if you give a
relative path like you did here.
if the script you called would be
http://www.example.com/news/2004-04-10/mypage.php
then config.php would have to be in /news
if your layout is
Mike Zornek wrote:
Is it true I can't include a file up a dir like this:
require_once '../config.php';
You should be able to include a file up one (or more) directories. Are
you sure it's only up one directory from were your script is being
called from?
This seems to work though:
require_once
On 24-Mar-2003 daniel wrote:
> hi there is a way to include files once in php3 ?
>
I've always used function_exists():
if (! function_exists('debug'))
include('common.inc');// get the basics
if (! function_exists('array_pop'))
include('libphp4.php3'); // get emulat
You could write a wrapper around the include function that uses a global
array, each time it is called it checks the global array to see if the
file has been included, if it hasn't it includes the file and adds the
file to the array.
Jason
daniel wrote:
hi there is a way to include files once i
"Gary" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for your response James!
> but still I must be doing something wrong the "1" is a persistent little
> bugger. Have you any tips on how to rewrite:
>
> echo @ require_once("topten.php");
> ?>
> using the ob_methods?
> A
Ernest E Vogelsinger wrote:
> At 20:19 07.03.2003, Gary said:
> Rewrite this to just
> require_once('topten.php');
Thanx Ernest!
that does the trick
Gary
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 20:19 07.03.2003, Gary said:
[snip]
>Thanks for your response James!
>but still I must be doing something wrong the "1" is a persistent little
>bugger. Have you any tips on how to rewrite:
>
>echo @ require_once("topten.php");
> ?>
>using the ob_methods?
-
Thanks for your response James!
but still I must be doing something wrong the "1" is a persistent little
bugger. Have you any tips on how to rewrite:
using the ob_methods?
Again thanx for your response
Gary
James Holden wrote:
> The '1' is received simply because your requirement clause echoed t
The '1' is received simply because your requirement clause echoed the
result to the page.
include, require and include_once all return boolean results of 1 or 0
which indicates a successful loading of said include. If you want to
suppress the output of an include use ob_ methods which prevent
At 17:28 07.03.2003, Gary spoke out and said:
[snip]
>Hi
>I've included the following in a php document:
>echo @ require_once("anyfile.php")
>>
>and it works exactly as I expect except at the end of the included document
>theres a single "1" displayed. I've n
On Fri, 2003-03-07 at 18:28, Gary wrote:
> Hi
> I've included the following in a php document:
> echo @ require_once("anyfile.php")
> >
use only
if you use echo require_once("somefile.php"); it will include the file
and then echo 1 witch is the return value of require_once;
> and it works exact
Ofcourse there can only be one home function:
require_once "HTML/IT.php";
class Home {
var $tpl_home = NULL;
function Home(){
$this->tpl_home = new
IntegratedTemplate("../templates");
$this->tpl_hom
Hiya
Try it like this:
require_once "HTML/IT.php";
class Home {
var $tpl_home = NULL;
function Home () {
$this->tpl_home = new
IntegratedTemplate("../templates");
}
function Home(){
> -Original Message-
> From: @ Darwin [mailto:superbus22@;attbi.com]
> Sent: 01 November 2002 10:17
>
> Well, the way I've read it is that if you use require within control
> structures then all files are included, regardless of whether
> the script
> exits before it reaches its next if..
Well, the way I've read it is that if you use require within control
structures then all files are included, regardless of whether the script
exits before it reaches its next if...elseif...else or case statement. With
include that does not happen. So the general rule of thumb would be to use
requir
Try putting GLOBAL infront of the var to give it the greater scope
- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "Inércia Sensorial" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 8:50 PM
Subjec
I guess I know what may be wrong. My function that includes the files, it
is called several times, with different arguments being passed.
It is something like:
function LoadPositionedModules ($posv, $posh)
{
// $posv is vertical position, and $posh is horizontal position
// Inside it
Actually this does work:
//First_File.php
//Second_File.php
//Active file
That would produce the output of :
I am the test variable
An include or require just places the files' contents at the line you
include it. So after the includes(requires) my parsed code was:
Hope this helps
52 matches
Mail list logo