Re: [PHP] include path file errors

2006-04-08 Thread kmh496
2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main

Re: [PHP] include path file errors

2006-04-08 Thread John Hicks
kmh496 wrote: 2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main

Re: [PHP] include path file errors

2006-04-08 Thread John Hicks
kmh496 wrote: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says require_once ($_SERVER[document_root]./_common.php); // main include file for whole site it sends

Re: [PHP] include path file errors

2006-04-08 Thread kmh496
2006-04-08 (토), 12:18 -0400, John Hicks 쓰시길: kmh496 wrote: 2006-04-08 (토), 18:20 +0900, kmh496 쓰시길: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); common.php has a line which says

Re: [PHP] include file path errors

2006-04-08 Thread tedd
At 6:15 PM +0900 4/8/06, kmh496 wrote: hi, my webroot is /a/b/current/ i am in /a/b/current/d/file.php file.php has a line require_once ($_SERVER[document_root]./d/common.php); it finds the file, but the variables inside common.php are not set and don't exist in file.php where is my

Re: [PHP] include not working properly?

2006-03-09 Thread Jochem Maas
robert mena wrote: Hi, Thanks. it worked. Since I have a common server where various virtualhosts reside what would you recommend in terms of security? 1. don't let assholes on your box. 2. read http://phpsec.org safemode and openbase_dir are primarily designed to protected legitimate

Re: [PHP] include not working properly?

2006-03-07 Thread Chris
robert mena wrote: Hi, I am facing a strange problem. One of my classes uses a include(Log.php) to enable to to use the Log class that comes with pear. *Fatal error*: require_once() [function.requirehttp://www.manaushoteis.tur.br/function.require]: Failed opening required 'Log.php'

Re: [PHP] Include after image or a way to reset header

2006-02-03 Thread Gerry Danen
Call the image rendering from another page and then let that page continue: caller.php: if ( $is_logged_in ) { echo p align=\center\img border=0 src='showimage.php?id=$get_picp=$from' alt=\Photo name: $get_pic\/p; if ( $get_name != ) echo p align=\center\$get_name/p; } showimage.php: ?php

Re: [PHP] Include after image or a way to reset header

2006-02-03 Thread Richard Lynch
On Fri, February 3, 2006 10:15 am, tedd wrote: This is probably an obvious question, but after you create an image, how can you include another php script? Your image is a single, atomic, non-divisible, non-extensible, object. You should have one URL for the image:

Re: [PHP] include() problem

2006-01-09 Thread David Grant
Nuno, Have you considered $_SERVER['DOCUMENT_ROOT']? David Nuno Trancoso wrote: This may sound dumb, but i have been up all night going through php/apache docs, and still have not found an answer.. Throughout a site i need to include files that are scattered in subdirs, sometimes up in

RE: [PHP] include() problem

2006-01-09 Thread Dan Parry
Check this out http://uk2.php.net/reserved.variables DOCUMENT_ROOT will give you the root of your site -Original Message- From: Nuno Trancoso [mailto:[EMAIL PROTECTED] Sent: 09 January 2006 14:56 To: php-general@lists.php.net Subject: [PHP] include() problem This may sound dumb, but i

Re: [PHP] include() problem

2006-01-09 Thread Gerry Danen
Here's a snippet of what's at the start of most of my php files: $pagetitle = Lily Articles; $pagefname = __FILE__; // for later logging $pagedocroot = $_SERVER['DOCUMENT_ROOT']; require_once ($pagedocroot/include_db/db_connect.php); require_once ($pagedocroot/include/funcs.php); Hope that

Re: [PHP] include/include_once php_check_syntax() / E_PARSE errors

2005-11-15 Thread Curt Zirzow
On Tue, Nov 15, 2005 at 10:48:56PM +, Thiago Silva wrote: ... So, __autload has to *try* include_once's. Something like that: function __autoload($className) { include_once(${className}.php); if(class_exists($className, false)) return; include_once(${className}.class.php);

Re: [PHP] include file to global scope

2005-10-12 Thread Jochem Maas
Claudio wrote: Hi, I'm using PHP 5. I have a class operation that includes php files. Is there a way to include this files to global scope? So that difined vars and functions are global accesseble? first off I would recommend that you 'pollute' your global scope as little as possible.

Re: [PHP] include file to global scope

2005-10-12 Thread Claudio
first off I would recommend that you 'pollute' your global scope as little as possible. I agree at all! Thats my opinion, and i don't use global variables at all. The problem is, other people do. And if I need to use their code I must include it. that said the solution will probably involve

Re: [PHP] include file to global scope

2005-10-12 Thread Claudio
Is it possible to process the file in second php instance? An only get its output? Claudio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include file to global scope

2005-10-12 Thread Jochem Maas
Claudio wrote: Is it possible to process the file in second php instance? An only get its output? yes - but its heavy to do (which ever way you do it). basically you need to either call a commandline php script via exec() (or something similar) e.g. exec('php /path/2/your/script.php'); //

Re: [PHP] include()

2005-06-13 Thread Rasmus Lerdorf
() is meaningless in an include. But in PHP you can put () around just about anything you want. Just like you can do: $a = ($b); There is no point in the brackets there. The PHP parser simply uses brackets to create precedence groups. So yes, you can do include(foo.php) if you want, but you

Re: [PHP] include()

2005-06-13 Thread Richard Davey
Hello, Monday, June 13, 2005, 5:02:40 PM, you wrote: IG Is there a big difference between me including a file by putting IG the url in the include() such as IG include(http://www.examplesite.com/examplefile.php) and putting IG the server path such as IG

Re: [PHP] include file and problems with headers

2005-05-27 Thread Philip Hallstrom
Make sure you don't have any blankspace before or after the ?php ... ? in your stats.php file. That's usually what does it. On Sat, 21 May 2005, Ross wrote: I have the folowing code which checks whether the user has logged in. if (!isset ($_SESSION['new_session'] ) ) { $login_status = div

Re: [PHP] Include Remote Content as REMOTE_ADDR of Browser

2005-05-27 Thread Ryan Grange
Gary C. New wrote: Is there a quick and dirty way to include, file, or fsockopen content from a remote server and make it appear as though the request was straight from the browser's remote address? Thank you for your assistance. Respectfully, Gary I believe you would in effect by

Re: [PHP] include file and problems with headers

2005-05-27 Thread Brian V Bonini
On Sat, 2005-05-21 at 06:30, Ross wrote: I have the folowing code which checks whether the user has logged in. if (!isset ($_SESSION['new_session'] ) ) { $login_status = div class=\standard_text\Your are not signed in /div; } if (isset ($_SESSION['new_session'] ) ) { $address =

RE: [PHP] include remote class

2005-05-11 Thread PHP
on the manual page that i tried using .inc but server did not parse it. a setting perhaps? -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 9:52 PM To: Andy Sandvik Cc: php-general@lists.php.net Subject: Re: [PHP] include remote class On Tue, May 10

Re: [PHP] include remote class

2005-05-11 Thread Dan Rossi
im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? If you surf to that URL, do you see PHP source, or do you see HTML/nothing? You may want to

Re: [PHP] include remote class

2005-05-10 Thread Greg Donald
On 5/10/05, Andy Sandvik [EMAIL PROTECTED] wrote: im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? If it's a PHP file sitting on a web server

Re: [PHP] include remote class

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 10:10 am, Andy Sandvik said: im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? If you surf to that URL, do you see PHP

Re: [PHP] include with remoted address

2005-04-06 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: A this point to include a file in a my script I must use for each .PHP file: ?phprequire_once $g_hostname . '/config_inc.php';'/html_api.php';html_head_end();? There is another way (i think to php.ini) to set default include, require_once, working area to my

Re: [PHP] include with remoted address

2005-04-06 Thread Richard Lynch
On Wed, April 6, 2005 12:00 am, [EMAIL PROTECTED] said: Hi to all, I've wrote a program with a web-browser interface (IE) and a built-in server (INDY) which call the php-cgi.exe CGI application and redirect stdio/stdout/sterr to pass .php scripts readed from a crypted and zipped sets of

Re: [PHP] Include file

2005-04-05 Thread Richard Lynch
On Wed, March 30, 2005 2:31 pm, [EMAIL PROTECTED] said: ...Scripts using single quotes run slightly faster because the PHP parser can include the string directly. Double quoted strings are slower because they need to be parsed This is PATENTLY FALSE, at least in part. PHP *must* parse

Re: [PHP] Include file

2005-03-30 Thread xfedex
This way is faster: include('..includes/' . $include); Its always better to avoid using doublequotes. meatbread. On Tue, 29 Mar 2005 20:55:17 -0500, James Pancoast [EMAIL PROTECTED] wrote: Try it with double quotes instead: include( ../includes/$include ); That way works for me. And

RE: [PHP] Include file

2005-03-30 Thread Jay Blanchard
[snip] This way is faster: include('..includes/' . $include); Its always better to avoid using doublequotes. [/snip] Why is it faster? And why should you avoid using double quotes? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Include file

2005-03-30 Thread xfedex
Why is it faster? And why should you avoid using double quotes? ...Scripts using single quotes run slightly faster because the PHP parser can include the string directly. Double quoted strings are slower because they need to be parsed Quoted from:

RE: [PHP] Include file

2005-03-30 Thread Jay Blanchard
cc: Subject:RE: [PHP] Include file [snip] This way is faster: include('..includes/' . $include); Its always better to avoid using doublequotes. [/snip] Why is it faster? And why should you avoid using double quotes? [/snip] 1. Always reply to the list ('reply-all

RE: [PHP] Include file

2005-03-30 Thread Jay Blanchard
[snip] Why is it faster? And why should you avoid using double quotes? ...Scripts using single quotes run slightly faster because the PHP parser can include the string directly. Double quoted strings are slower because they need to be parsed Quoted from:

Re: [PHP] Include file

2005-03-30 Thread John Nichel
Jay Blanchard wrote: snip I try to use both types of quotes in the proper circumstance. Having said that, I came to computing in the age where we worried over CPU cycles, but I don't see how in this day and age the difference between the two would even matter. Even on a high load site the

Re: [PHP] Include file

2005-03-30 Thread xfedex
On Wed, 30 Mar 2005 15:14:27 -0600, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Why is it faster? And why should you avoid using double quotes? ...Scripts using single quotes run slightly faster because the PHP parser can include the string directly. Double quoted strings are slower

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Include file

2005-03-30 Thread Mattias Thorslund
Jay Blanchard wrote: I try to use both types of quotes in the proper circumstance. Having said that, I came to computing in the age where we worried over CPU cycles, but I don't see how in this day and age the difference between the two would even matter. Even on a high load site the difference

Re: [PHP] Include file

2005-03-30 Thread John Nichel
Because I'm bored, I decided to test the theory. AMD 3200xp 1.5gb Memory RHEL AS 3 I ran the test 20 times, and 18 of those times, double quotes were faster than single quotes. Don't always trust what you read. Not to mention the fact that the 'faster' of the two was 'faster' by an average of

Re: [PHP] Include file

2005-03-30 Thread Martin . C . Austin
cc: Subject:Re: [PHP] Include file On Wed, 30 Mar 2005 15:14:27 -0600, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Why is it faster? And why should you avoid using double quotes? ...Scripts using single quotes run slightly faster because the PHP parser can include

Re: [PHP] Include file

2005-03-30 Thread xfedex
On Wed, 30 Mar 2005 16:45:32 -0500, John Nichel [EMAIL PROTECTED] wrote: Because I'm bored, I decided to test the theory. AMD 3200xp 1.5gb Memory RHEL AS 3 I ran the test 20 times, and 18 of those times, double quotes were faster than single quotes. Don't always trust what you read.

Re: [PHP] Include file

2005-03-30 Thread John Nichel
xfedex wrote: snip all my stuff Here is my test in a PIII 550Mhz 128mb with gentoo: for ($i = 0; $i = ; $i++) { $include = 'db_connect.php'; include('include/'.$include); } 3.623316 seconds -- for ($i = 0; $i = ; $i++) { $include =

Re: [PHP] Include file

2005-03-29 Thread Richard Davey
Hello Marquez, Wednesday, March 30, 2005, 2:41:15 AM, you wrote: MD Does anyone know how to include a variable page? The variable is a page MD name. Such as inluded_file.html MD Include ('../includes/$include'); MD Does not seem to work. You cannot use variables inside single quotes. Try

Re: [PHP] Include file

2005-03-29 Thread James Pancoast
Try it with double quotes instead: include( ../includes/$include ); That way works for me. And I also hope you're cleansing or filtering $include in some way. On Tue, 29 Mar 2005 19:41:15 -0600, Marquez Design [EMAIL PROTECTED] wrote: Does anyone know how to include a variable page? The

Re: [PHP] include literal

2005-03-28 Thread Leif Gregory
Hello Jeremy, Monday, March 28, 2005, 1:36:10 PM, you wrote: J -- J I would like the output of Document B to be: J ?php echo 'something here'; ? J instead of something here. J -- highlight_file('Document A'); -- Leif (TB lists moderator and fellow end user).

Re: [PHP] include literal

2005-03-28 Thread Chris Shiflett
Jeremy Reynolds wrote: What if I want to include some literal test into a PHP document that I don't want it to interpret as it loads. You can use something like readfile() instead of include. Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP

RE: [PHP] include(sendmail.phps);

2005-03-13 Thread Robbert van Andel
Read the contents of the file into a variable and then output the contents of the variable via print or echo. -Original Message- From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 10:09 PM To: php-general@lists.php.net Subject: [PHP] include(sendmail.phps);

Re: [PHP] include(sendmail.phps);

2005-03-13 Thread Burhan Khalid
John Taylor-Johnston wrote: I want to include a phps file. But would like it to display the coloured formatting of a phps, instead of executing the code with in. Is this possible? This does not work: include(sendmail.phps); http://www.php.net/highlight-file -- PHP General Mailing List

RE: [PHP] include files, .php or .inc ?

2004-11-22 Thread steve
Graham Cossey wrote: If you only have limited control/knowledge of Apache you could adopt names something like: script.inc.php In such a way PHP will always process the script as it's extension is .php and you can easily identify that it is a script to be included/required. FWIW, I use

Re: [PHP] include files, .php or .inc ?

2004-11-22 Thread Marek Kilimajer
Richard Davey wrote: Hello Perry, Sunday, November 21, 2004, 8:02:48 PM, you wrote: PJ What it the purpose of the .inc file then? Security - on a properly configured web server a .inc file will never actually try and compile/execute itself. Whereas a .php one always will. Yes, .inc files will show

Re: [PHP] include files, .php or .inc ?

2004-11-22 Thread Justin French
On 22/11/2004, at 7:02 AM, Perry Jönsson wrote: What it the purpose of the .inc file then? It gives you a way of knowing what's a directly executable file (like index.php) and what's an included file. Further, I disallow the direct serving of all .inc files in my htaccess, so that people can't

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Jon-Eirik Pettersen
Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Perry Jönsson
Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then? /Perry -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Jon-Eirik Pettersen
Perry Jönsson wrote: Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then? Not really anything. Just to

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread Janet Valade
Perry Jönsson wrote: Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then? For organization. The file name

RE: [PHP] include files, .php or .inc ?

2004-11-21 Thread Graham Cossey
Perry Jönsson wrote: Jon-Eirik Pettersen wrote: Perry Jönsson wrote: Hello, Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? No, it does not. What it the purpose of the .inc file then?

Re: [PHP] include files, .php or .inc ?

2004-11-21 Thread John Holmes
Perry Jnsson wrote: Does it make any difference if you include (include/require/include_once/require_once) files with extension .inc or .php? It makes no difference as far as PHP is concerned. You're just telling PHP what file to load. However, .inc files are generally served up as plain text

Re: [PHP] include()ing into a variable

2004-10-14 Thread ApexEleven
I believe that include() returns true|false, so $a would equal true if the file is included and false if it is not. On Thu, 14 Oct 2004 10:35:15 -0700 (PDT), Mag [EMAIL PROTECTED] wrote: Hi, I have never done this before (but in my first test it seems to work), I am include()ing a file into a

RE: [PHP] include()ing into a variable

2004-10-14 Thread Jesse Castro
[snip] $a=include(th-file.php); [/snip] Mag, I have never seen this approach before. This is the way I would do something like that. $file=./th-file.php; if (!($fp = fopen($file,r))){ echo Could not open .$file; exit(); } $a = fread($fp, filesize($file)); fclose($fp); See

Re: [PHP] include()ing into a variable

2004-10-14 Thread Curt Zirzow
* Thus wrote Mag: Hi, I have never done this before (but in my first test it seems to work), I am include()ing a file into a variable like this: $a=include(th-file.php); Will this give me any extra problems later on? or is this resource intensive? The reason I am doing this is

Re: [PHP] include()ing into a variable

2004-10-14 Thread Simas Toleikis
ApexEleven wrote: I believe that include() returns true|false, so $a would equal true if the file is included and false if it is not. If you use *return* on global scope in include file that value will be returned to $a. -- test.php -- $test = Hello; return $test; - $a = include test.php; //

Re: [PHP] include()ing into a variable

2004-10-14 Thread Gerard Samuel
Mag wrote: Hi, I have never done this before (but in my first test it seems to work), I am include()ing a file into a variable like this: $a=include(th-file.php); Will this give me any extra problems later on? or is this resource intensive? I've seen other people do something similar to this, but

Re: [PHP] include()ing into a variable

2004-10-14 Thread Mag
Hi Curt, Thanks for replying. class SaveToFile { function open($file) { //open file... } function write($buf) { //write to file... } function close() { //close file } } $obSaveFile = new SaveToFile(); $obSaveFile-open('/path/to/file.html');

Re: [PHP] include()ing into a variable

2004-10-14 Thread Curt Zirzow
* Thus wrote Mag: Hi Curt, Thanks for replying. $obSaveFile = new SaveToFile(); $obSaveFile-open('/path/to/file.html'); ob_start(array($obSaveFile, 'save'), 1024); /* do your stuff here */ ob_end_flush(); $obSaveFile-close(); Problem is, I have not really learnt classes

Re: [PHP] Include if file exists?

2004-08-27 Thread Matt M.
On Fri, 27 Aug 2004 12:16:32 +0200, Jay [EMAIL PROTECTED] wrote: Hi! Is there a ready to use PHP function for including ONLY if the file exists? I tried it like this: [main.php] include_once(lib.php); .later includeIf(somefile.php); [lib.php] function includeIf($filename) {

Re: [PHP] Include if file exists?

2004-08-27 Thread John Nichel
Jay wrote: Hi! Is there a ready to use PHP function for including ONLY if the file exists? I tried it like this: [main.php] include_once(lib.php); later includeIf(somefile.php); [lib.php] function includeIf($filename) { if (!file_exists($filename)) { include_once($filename);

RE: [PHP] Include path

2004-07-23 Thread Jay Blanchard
[snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in

Re: [PHP] Include path

2004-07-23 Thread John W. Holmes
PHP Gen wrote: Hello, I am a bit confused :-(, this is my server path: /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ include('/home/sites/site80/web/templates/header.php'); Are you looking for a

RE: [PHP] Include path

2004-07-23 Thread PHP Gen
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php

Re: [PHP] Include path

2004-07-23 Thread Matt M.
Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. if you dont know what directory it will be in, how

RE: [PHP] Include path

2004-07-23 Thread Vail, Warren
Have you tried; Include ../templates/header.php; Warren Vail -Original Message- From: PHP Gen [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 12:28 PM To: Jay Blanchard; php php Subject: RE: [PHP] Include path --- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] /home/sites

RE: [PHP] Include path

2004-07-23 Thread Ed Lazor
$baseDir = $_SERVER[DOCUMENT_ROOT]; $templatesDir = $baseDir . /templates/; include($templatesDir . header.php); include($templatesDir . body.php); include($templatesDir . footer.php); :-) Good solution, but the problem is once the program is completed it goes out of my hands and most

Re: [PHP] Include path

2004-07-23 Thread Matt M.
Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; sorry, I meant include($_SERVER['DOCUMENT_ROOT'].'/templates/header.php'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Include path (SOLVED)

2004-07-23 Thread PHP Gen
Hey everyone, ** Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; ** Matt, DAMN! THATS what I was looking for. No, didnt try that, took the long route home instead, but atleast brushed up on php's explode function. ** $baseDir = $_SERVER[DOCUMENT_ROOT]; $templatesDir = $baseDir . /templates/;

[PHP] Re: PHP Include not Working Correctly

2004-07-09 Thread Thomas Seifert
Harlequin wrote: ?php include Header.inc; ? Brings in the correct file but not an images referenced in the CSS file, just the background and formatting. Has anyone come across this before...? Huh? The include-statement just includes code/html, it doesn't correct any links or such. probably the

Re: [PHP] include but not browse

2004-07-05 Thread Jason Wong
On Monday 05 July 2004 16:18, Tumurbaatar S. wrote: Generally, it isn't a PHP related but... I'm not a Linux/Apache user and know nothing about how to manage permissions there. I need to disable browsing for some of subfolders on my site but php scripts located in these subfolders should be

Re: [PHP] include but not browse

2004-07-05 Thread Jason Wong
On Monday 05 July 2004 17:48, Jason Wong wrote: On Monday 05 July 2004 16:18, Tumurbaatar S. wrote: Generally, it isn't a PHP related but... I'm not a Linux/Apache user and know nothing about how to manage permissions there. I need to disable browsing for some of subfolders on my site

Re: [PHP] include() with a query string?

2004-07-02 Thread Justin Patrin
On Sat, 03 Jul 2004 03:02:07 +1000, Trejkaz Xaoza [EMAIL PROTECTED] wrote: Is there some way to fake inclusion with a query string attached? Yep. Set the $_GET, $_POST, or $_REQUEST vars you need before including. You could also store a backup copy before doing this and put it back after

Re: [PHP] include() with a query string?

2004-07-02 Thread Trejkaz Xaoza
Justin Patrin wrote: On Sat, 03 Jul 2004 03:02:07 +1000, Trejkaz Xaoza [EMAIL PROTECTED] wrote: Is there some way to fake inclusion with a query string attached? Yep. Set the $_GET, $_POST, or $_REQUEST vars you need before including. You could also store a backup copy before doing

Re: [PHP] include() with a query string?

2004-07-02 Thread Justin Patrin
It just depends on the vars that the code expects. If it expects them to come via get, it may be $_GET, post, it may be $_POST. Or either of those could be in $_REQUEST (which is populated according to a config var) in a certain order from $_GET, $_POST, and $_COOKIE. In addition, $_GET can be in

Re: [PHP] include() with a query string?

2004-07-02 Thread Trejkaz Xaoza
Justin Patrin wrote: It just depends on the vars that the code expects. If it expects them to come via get, it may be $_GET, post, it may be $_POST. Or either of those could be in $_REQUEST (which is populated according to a config var) in a certain order from $_GET, $_POST, and $_COOKIE. In

RE: [PHP] include question

2004-06-28 Thread Aaron Axelsen
Thanks, worked wonders. -- Aaron Axelsen Email: [EMAIL PROTECTED] -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 10:40 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] include question On Mon, 21 Jun 2004 10:31:42 -0500

Re: [PHP] include question

2004-06-21 Thread Greg Donald
On Mon, 21 Jun 2004 10:31:42 -0500 (CDT), Aaron Axelsen [EMAIL PROTECTED] wrote: Below is the chunk of code i am using. In the verify_faculty_info.php file i call the search function. The search function is coded in the function.php file which is included in the accesscontrol.php. I

Re: [PHP] include question

2004-06-21 Thread Keith Greene
Aaron, I copied your code to a test file called test.php and created the following pages as dummy includes: verify_faculty_info.php, functions.php and accesscontrol.php in functions.php, I created a dummy search function: function search(){ return Found!BR; } in verify_faculty_info.php,

RE: [PHP] include and require

2004-05-27 Thread php chucker
include() will output warning message and the script continues require() will output error message and will halt the script -Original Message- From: Lieve Vissenaeken [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 2:05 PM To: [EMAIL PROTECTED] Subject: [PHP] include and

RE: [PHP] include and require

2004-05-27 Thread Chris W. Parker
Lieve Vissenaeken mailto:[EMAIL PROTECTED] on Thursday, May 27, 2004 11:05 AM said: Can anyone help me with this one: Is there a difference between include() and require() ? yes i can help you with it. go to www.php.net and search for include. you will then find the answer you are

Re: [PHP] include and require

2004-05-27 Thread Michal Migurski
Can anyone help me with this one: Is there a difference between include() and require() ? http://php.net/require http://php.net/include require() and include() are identical in every way except how they handle failure. include() produces a Warning while require()

Re: [PHP] include (or require) doesn't seem to work

2004-05-11 Thread Daniel Clark
Think you want something like this. require(/tristan/library.php); Hi, I'm almost ashamed to ask this question as surely enough the problem is something very basic but, nonetheless, I can't put my finger on it. I'm trying to implement the concept of a library (library.php) on

Re: [PHP] Include from another URL?

2004-05-06 Thread Curt Zirzow
* Thus wrote Nik ([EMAIL PROTECTED]): Include a content from another URL into the current output. I have done something like this: -- code start ?php include 'http://myotherurl.com:8080'; ? -- code end You want to use readfile() instead. http://php.net/readfile Curt -- I

Re: [PHP] Include from another URL?

2004-05-06 Thread Chris Boget
Include a content from another URL into the current output. I have done something like this: Look into the fopen() function. I also believe that the file() function can also take a URL, but I'm not sure. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Include from another URL?

2004-05-06 Thread Nik
Great! Worked as expected. Thanks. Now it is time to ask how do I handle form (HTTP POST request) data into the URL. Can the same fopen() work as well? Thanks, Nik Chris Boget [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Include a content from another URL into the current output.

RE: [PHP] Include Errors

2004-04-01 Thread Aaron Axelsen
: Nikolay Bachiyski [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 3:01 AM To: Aaron Axelsen Subject: Re: [PHP] Include Errors On April, 01 2004 ?. 11:41 Aaron Axelsen [EMAIL PROTECTED] wrote -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I recently upgraded from 4.3.4 to 4.3.5 and now I

Re: [PHP] include (byname.php?lang=fr);

2004-02-18 Thread John W. Holmes
From: John Taylor-Johnston [EMAIL PROTECTED] I want to create a language option, so the resulting html is in French or English, depending. But passing variables like this doesn't work: ?php include (../_phpcode/byname.php?lang=fr); ? echo $lang; // 'fr' Warning: main(): Failed opening

Re: [PHP] include (byname.php?lang=fr);

2004-02-18 Thread John Taylor-Johnston
Why didn't I think of that :) ? Thanks John, John John W. Holmes wrote: From: John Taylor-Johnston [EMAIL PROTECTED] I want to create a language option, so the resulting html is in French or English, depending. But passing variables like this doesn't work: ?php include

Re: [PHP] include a file

2004-02-16 Thread Marek Kilimajer
Angelo Zanetti wrote: Hi, is it possible to include a file from when a select's onChange is called ie: select name=prospects onChange=include(editBottom.inc); if its possible what would be the best way to do this?? thanx It is, but you have to reload the page and pass the filename as

RE: [PHP] include a file

2004-02-16 Thread Angelo Zanetti
: Re: [PHP] include a file Angelo Zanetti wrote: Hi, is it possible to include a file from when a select's onChange is called ie: select name=prospects onChange=include(editBottom.inc); if its possible what would be the best way to do this?? thanx It is, but you have to reload

Re: [PHP] include result from script in midle of other script

2004-02-14 Thread Adam Bregenzer
On Sat, 2004-02-14 at 15:46, Boneripper wrote: ? if ($_SESSION['valores_relativos']) echo 'img src=./5_grafico_total.php?aVar=aValue'; else include (./5_grafico_total.php?aVar=aValue);? Using include literally inserts the contents of the file into your code. One way to achieve what you are

Re: [PHP] include result from script in midle of other script

2004-02-14 Thread Marek Kilimajer
Boneripper wrote: hi, im trying to do this: ... BR ? if ($_SESSION['valores_relativos']) echo 'img src=./5_grafico_total.php'; else include (./5_grafico_total.php);? /FONT ... and it works perfectly, BUT if i wanna send vars with GET like: ... BR ? if ($_SESSION['valores_relativos']) echo 'img

Re: [PHP] include date

2004-01-25 Thread John Nichel
John Taylor-Johnston wrote: I want to include (/home/myaccount/calendars/+nameofmonth+.htm) How can I get the name of the current month? I'm sure this is an easy one, I'm too tired to see it. include (/home/myaccount/calendars/+date(f)+.htm) But date(F) is Capitalised. There is no date (f) for

Re: [PHP] include working....but confusion

2004-01-20 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] Do I have to start and end the included files with ?php ? ? Yes. One day you'll learn to spend the two seconds trying this instead of asking the list. I'll be so proud of you then! ;) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] include working....but confusion

2004-01-20 Thread Ryan A
Hey, Thanks for the very informative reply but I did try itproblem is, it seems to work with and without...thats why the confusion. I have one program like the one i outlined and the second one, like this: some html code goes here some output stuff goes here something ? php stuff? something

<    1   2   3   4   5   6   7   >