Hi,it outputs a corrupt image (I think the function imagepng)Am 30.05.2013, 11:17 Uhr, schrieb Alex Pojarsky :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 behavior?
On Thu, May 30,
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;
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 con
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_
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
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 val
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 do
[LSS] [mailto:[EMAIL 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
>
> -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
}
}
---
--index.php--
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] in
> -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 com
n Heng
Cc: [EMAIL PROTECTED]
Subject: RE: [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
> -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 $GLOBAL[$make
Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-Original Message-
From: Greg Beaver [mailto:[EMAIL PROTECTED]
Sent: Saturday, 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
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 f
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
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
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 indeed
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 ne
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 v
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
> 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
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 the
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 P
f "HTML mode" within 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
>
Mike,
i had no problems with this..
# Do things
LogBook
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> 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
bllaalla
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
: <[EMAIL PROTECTED]>
Sent: 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 li
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. ind
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 p
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 requi
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 ?>..http://www.php.net/)
To
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,
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 tur
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 (ht
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 directo
I have the following problem.
code of index.php
---
0)) {
include_once(ROOT."/admin/main.php");
} else {
header("Location: " . generate_URL("/admin/login"));
}#end if
?>
I have the following problem.
code of index.php
---
0)) {
include_once(ROOT."/admin/main.php");
} else {
header("Location: " . generate_URL("/admin/login"));
}#end if
?>
> 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
t; To: 'Thiago Locatelli da Silva'; [EMAIL PROTECTED]
> 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 L
7;; [EMAIL 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.
> 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 unsu
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
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]
This is a good time for a quick lesson on just exactly what include/require
actually does.
The following two examples are exactly the same, in almost every way:
=== Example 1 ===
example1A.php:
example1B.php:
The output is "Hello World!", and that's all.
=== Example 2 ===
example2.php:
is the file localhost? because the file being localhost or remote makes a huge
difference. lets assume its localhost
incdex.php
now, variables.php will NOT return variables, thats not what is for. it just includes
the code, thats it.
variables.php
there you. include does NO
Lindsay Adams wrote:
> So, leaving out the table=$table will still result in $table being defined
> by the code prior to the include.
Actually, the the I'm trying to include has several segments in it, which
depend on which table was just queries. It basically looks like this:
if (tabl
Kirchner [mailto:[EMAIL 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 'variabl
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:
>
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 'variables.php?table=$table'
little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "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 scrip
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]
Fo
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" happen
>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 no
Which is the main difference between include() and
require() functions?
Thanks
Costis
--
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]
55 matches
Mail list logo