Hi,
I use the pretty large Library PHP Image Workshop
(http://phpimageworkshop.com/) at my project. It is about 75,5 KB.
Everything works fine but if I try to include a 15 KB file with country
codes, it fails.
With the other files I easily get over 100 KB inclusion size, so my
question;
Hi,it outputs a corrupt image (I think the function imagepng)Am 30.05.2013, 11:17 Uhr, schrieb Alex Pojarsky divine.ra...@gmail.com:Hey.Afaik - only in case if your PHP process instance exeeds allowed memory limit.Other then this - explain how does it fail exactly. Any error messages? Errorous
Boyan Nedkov wrote:
Initializing data members (var-s) of a class with non-constant values
is completely legal operation in PHP, so I don't think this could be a
reason for the problem.
hmmm... PHP manual says something else...
http://www.php.net/manual/en/language.oop.php
In PHP 4, only
Ryan A wrote:
...
class ads_DB extends DB_Sql {
var $Host = $MR_Host;
var $Database = $MR_Database;
var $User = $MR_User;
var $Password = $MR_Password;
}
I think, Your problem is here. If i remember correctly, then PHP4
doesn't allow to initialize var-s with non-constant
Ryan, Pavel,
Pavel Jartsev wrote:
Ryan A wrote:
...
class ads_DB extends DB_Sql {
var $Host = $MR_Host;
var $Database = $MR_Database;
var $User = $MR_User;
var $Password = $MR_Password;
}
I think, Your problem is here. If i remember correctly, then PHP4
doesn't allow to
Hey guys,
Thanks for replying.
This is the solution that actually works.
class ads_DB extends DB_Sql {
var $Host = ;
var $Database = ;
var $User = ;
var $Password = ;
/* public: constructor */
function ads_DB($query = ) {
global $MR_Host,$MR_Database,$MR_User,$MR_Password;
Hi,
I have a database class that is working perfectly by itself, the only
problem is it works fine when the login details to the database are in that
file...but since i have other apps using that login info I want to have the
login info in a seperate file an include it in this class...but when i
-Original Message-
From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
Sent: 09 July 2003 03:44
I finally got it. Thanks. All I needed to do was just
define global
$page_title inside the function to denote that I wanted to use that
variable.
One other quick question, in my
PROTECTED]
Sent: Wednesday, July 09, 2003 6:20 PM
To: Ow Mun Heng; Ford, Mike [LSS]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] include/require inside of function
-Original Message-
From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
Sent: 09 July 2003 03:44
I finally got it. Thanks. All I
-Original Message-
From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
Sent: 07 July 2003 04:34
Here's My question, a variable is not actually global is not
actually global until I make it global through global
$make_this_global
and then I can assess it using
: [PHP] include/require inside of function
-Original Message-
From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
Sent: 07 July 2003 04:34
Here's My question, a variable is not actually global is not
actually global until I make it global through global
$make_this_global
and then I can
-Original Message-
From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 15:53
Here's the thing.. I declared $page_title = My Page Title in a
file called config.php which is included in the index.php
page. when I tried
to - echo $page_title - Nothing comes out.
();
?
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 11:34 PM
To: Ow Mun Heng
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] include/require inside
, July 05, 2003 12:39 AM
To: Rasmus Lerdorf
Cc: Aric Caley; [EMAIL PROTECTED]
Subject: Re: [PHP] include/require inside of function
Hi,
If the file you are including is of your own authorage (I know that
isn't a word, but whatever :), just refer to global variables always as
an index of the $GLOBALS
Is there anyway to include a file inside of a function and have the included
stuff be global? For instance if I defined a class or a function in that
include file, I want to be able to use that class outside of the function.
On the documentation for include() a poster commented that it did
On Fri, 4 Jul 2003, Aric Caley wrote:
Is there anyway to include a file inside of a function and have the included
stuff be global? For instance if I defined a class or a function in that
include file, I want to be able to use that class outside of the function.
On the documentation for
Hi,
Friday, July 4, 2003, 5:11:18 PM, you wrote:
AC Is there anyway to include a file inside of a function and have the included
AC stuff be global? For instance if I defined a class or a function in that
AC include file, I want to be able to use that class outside of the function.
AC On the
Hi,
If the file you are including is of your own authorage (I know that
isn't a word, but whatever :), just refer to global variables always as
an index of the $GLOBALS array. This is good practice anyways for any
file that might be included by another user, for exactly this issue.
I have a
i am designing a small app that obviuosly works best when I have a lot of
global files with functions, which cut down on editing.
I will likely have a main page that will contain modules and also load
all of the required includes like config etc. in total some 10 files will
be reqested.
Is
Is there, was there ever issue around including a lot files via
include(). I am running things on a local server so it's hard to gauge.
I don't understand that comment. includes/requires are always (well
nearly anyway) local to the server regardless of where the request is
coming from. So if
These files are parsed by the interpreter...
They are not sent to the client, so I you are thinking bandwidth I dont see how it
would affect it.
Unless they all output a bunch of data.
Of course there will be some overhead for PHP to interpret all that code.
Mike
*** REPLY SEPARATOR
He likely ment that his local server is simply fast enough that any
speed defference is unnoticeable,
but on a shared host this might make some difference.
Use include/require as you are more comfortable with it.
Rasmus Lerdorf wrote:
Is there, was there ever issue around including a lot files
Sorry if this was not 100% clear. In a nutshell the app I'm making will
be available for poeple to use. My feeling is that there will be users
using shared servers, which under a stress tend to suck. The only thing
in this one I'm doing that;s new to me is having some 20 includes loaded
as I
Hi,
Can anybody tell me why I get a Parse error: parse error,
unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line
17
for the following code:
Appreciate any help.
Using PHP 4.2.2 and Apache 1.3.26 on Redhat 7.3 x86
(The stuff is not part of the code.
: Wednesday, August 14, 2002 10:44 AM
Subject: [PHP] Include/require and the HTML Code
Hi,
Can anybody tell me why I get a Parse error: parse error,
unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line
17
for the following code:
Appreciate any help.
Using PHP 4.2.2
Can anybody tell me why I get a Parse error: parse error,
unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line
begin and end your include files with ? and ?
?
function HtmlHeader()
{
?
bllaalla
?
return;
}
?
--
PHP General Mailing List (http://www.php.net/)
Mike,
i had no problems with this..
!-- index.php --
?
include('Functions.inc');
HtmlHeader();
?
# Do things
?
HtmlFooter();
?
!-- Functions.inc--
?
function HtmlHeader()
{
?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
htmlhead
the function that this
problem arises.
Thanks again
Mike.
-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 15 August 2002 6:52 AM
To: Mike Eales; [EMAIL PROTECTED]
Subject: Re: [PHP] Include/require and the HTML Code
Can anybody tell me why I get a Parse error
I'm not sure about others, but I am glad this behavior is like this.
It is very nice for modules to stand on their own so to speak, so that
you don't have to worry about what context they are used in. If the file
you are including is plain HTML, would you want it to be parsed as if it
were
On Tue, 2002-08-13 at 02:55, Huy wrote:
But I do...
If I left out the require statement all is well.. or I copy the whole
content of the included file.. it works fine. The problem is the require
statement.
Check the file for whitespace, anything outside ?..?php or
spaces/blank lines
Thanks,
I thought I checked that already. Obviously, I use notepad in Win2000 to
edit the files, and save them as Unicode file, which Notepad put some
characters at the beginning of the file. Only when I use another editor was
I able to see those strange characters. After deleting them, the
Huy,
Use Editplus, or something similar, not Notepad. Costs $45 and makes your
work *much* easier.
Miles
At 08:41 AM 8/13/2002 -0700, Huy wrote:
Thanks,
I thought I checked that already. Obviously, I use notepad in Win2000 to
edit the files, and save them as Unicode file, which Notepad put
If I use either the include or require statement, PHP will generate some
lines in the browser. For example, I want the first line is Hello There..
echo (Hello There); but the line happens to be the third line after some
blank lines. So how do I turn that off??
--
PHP General Mailing List
On Mon, 2002-08-12 at 22:14, Huy wrote:
If I use either the include or require statement, PHP will generate some
lines in the browser. For example, I want the first line is Hello There..
echo (Hello There); but the line happens to be the third line after some
blank lines. So how do I turn
But I do...
If I left out the require statement all is well.. or I copy the whole
content of the included file.. it works fine. The problem is the require
statement.
James Green [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Mon, 2002-08-12 at 22:14, Huy
Be careful not to get confused between a chrooted environment like the
web server or ftp server and php include paths. PHP handles the include
and require parameters either as absolute (eg /inc/filename is an
absolute path from / - it is not relative to the web docroot.) or
relative to the
I have the following problem.
code of index.php
---
?
require_once(dvojka_root.inc);
require_once(ROOT./admin/common/admin_func.inc);
session_start();
if(isset($_SESSION[user_id]) ($_SESSION[user_id] 0)) {
I have the following problem.
code of index.php
---
?
require_once(dvojka_root.inc);
require_once(ROOT./admin/common/admin_func.inc);
session_start();
if(isset($_SESSION[user_id]) ($_SESSION[user_id] 0)) {
PROTECTED]
Subject: RE: [PHP] include, require, require_once
Subject: [PHP] include, require, require_once
what is the diference beetwen this functions?
The difference is well explained on www.php.net - documentation -
{include, require, require_once}
RTFM!
Martin.
--
PHP General Mailing List
]
Subject: RE: [PHP] include, require, require_once
The difference is well explained on www.php.net - documentation -
{include, require, require_once}
RTFM!
Martin.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Lets not destroy the user community now :( All the time I hear Perl
users
are mea and rude The PHP community is great. I am just picking up
JSP
(have to, for work) and can't stand their manuals and their users
aren't
always as nice.
Lets keep PHP nice and friendly ;) Yes it is in the
what is the diference beetwen this functions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi,
On Sat, Jul 21, 2001 at 12:18:38AM -0300, Thiago Locatelli da Silva wrote:
what is the diference beetwen this functions?
I believe the include/require_once() functions check to see if that particular include
was previously included in the script and if it was it ignores it, at least that
Subject: [PHP] include, require, require_once
what is the diference beetwen this functions?
The difference is well explained on www.php.net - documentation -
{include, require, require_once}
RTFM!
Martin.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
I have a DB project going and every time I query the DB for data
from a particular table, I want to include a set of variables (that get
set based on the query result). I was thinking of doing something like
this:
$sql = "..."
$result = ;
include
On 4/5/01 10:56 AM, "Ashley M. Kirchner" [EMAIL PROTECTED] wrote:
I have a DB project going and every time I query the DB for data
from a particular table, I want to include a set of variables (that get
set based on the query result). I was thinking of doing something like
this:
PROTECTED]]
Sent: Thursday, April 05, 2001 11:57 AM
To: PHP-General List
Subject: [PHP] Include / Require
However, every time I try that, it tells me it can't find
'variables.php'. However, if I rename the file to 'variables.inc', it
does find it (though it doesn't pass any arguments
is the file localhost? because the file being localhost or remote makes a huge
difference. lets assume its localhost
incdex.php
?php
$table = 'test';
include_once("$DOCUMENT_ROOT/include/variables.php");
?
now, variables.php will NOT return variables, thats not what
Surfer!" [EMAIL PROTECTED]
Newsgroups: php.general
Sent: Monday, March 19, 2001 3:20 AM
Subject: [PHP] PHP - include / require
I was wanting a set of pages generated by individual PHP scripts to each
use one PHP script to generate the navigation links. However I'm not
winning - a suitable e
I was wanting a set of pages generated by individual PHP scripts to each
use one PHP script to generate the navigation links. However I'm not
winning - a suitable example would be much appreciated.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
Which is the main difference between include() and
require() functions?
"include" is optional
you can put it inside an "IF"
like this:
if (0)
{
/* THIS WILL NOT SHOW... */
include "optional_file.php";
}
but "require" happens every time,
even if it is inside an "IF" that does not
At 13:41 7/3/2001, Derek Sivers wrote:
Which is the main difference between include() and
require() functions?
"include" is optional
you can put it inside an "IF"
like this:
if (0)
{
/* THIS WILL NOT SHOW... */
include "optional_file.php";
}
but "require" happens every time,
52 matches
Mail list logo