[PHP] Including file from a registered shutown function on a syntax parse error
Greetings, If I register a shutdown function in PHP (to catch syntax parse errors and send them in logs), it looks like I can open files, but I cannot do includes - that is, if the reason of exit is a syntax parse error. Is this a desired effect? It seems a tad odd that I could do eval(preg_replace("#^<\?[php]?#", "", file_get_contents($file))); but not include($file); -- Marc Trudel-BĂ©lisle www.wizcorp.jp
[PHP] including file hosted by "www.a.com" on "www.b.com"
I'm in trouble with include procedure. I have a file on host http://www.a.com that must be included by the file on the host http://www.b.com The code of the file to be included is as follows: included.php on http://www.a.com The code of the file which must include first file is as follows: master.php on http://www.b.com http://www.a.com/included.php'); echo $value; echo $value[0]; echo $value[1]; echo $value[2]; ?> The expected output would be: "Arrayzeroonetwo" but the include procedure doesn't work correctly working on different host. Can anyone help me please?? I'm in a very big trouble. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Including file...
""Martin Hughes"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I seem to be making a mistake somewhere... > > > # Define the navigation bar array > $navbar = array("navmain", "info", "music", "orch", "synth", "syntype", > "audio", "recordings"); > > # Define the pages in arrays by section > $main = array("home"); > $info = array("infomain", "about", "contact", "guestbook"); > $music = array("musicmain", "musprologue", "mus1", "mus2", .., "mus28", > "musepilogue", "musbows", "musplayout"); > $orch = array("orchmain", "strings", "brass", "woodwind", "percussion", > "rhythm"); > $synth = array("synthmain", "part", "patches"); > $synthtype = array("synthtypemain", "dx7", "k2000", "k2vx", "k2500"); > $audio = array("audiomain", "synth"); > $recordings = array("recordingsmain", "reccompare", "olc", "obc", "csr", > "tac", "lon97"); > > # Store the arrays in an array > $sections = array("&$main", "&$info", "&$music", "&$orch", "&$synth", > "&$synthtype", "&$audio", "&$recordings") Why do you enclose with double quotes? You dont need them at all, try w/o double qoute. Should work then. Regards, -- Yasuo Ohgaki PHP and Related resources [PHP FAQ] http://www.php.net/FAQ.php [PHP Manual] http://www.php.net/manual/en/ [PHP Links] http://www.php.net/links.php [RFCs] http://www.faqs.org/rfcs/ > > # Create the name of the .inc file > $pagename = $sections[$sect][$page]; # ***THIS LINE IS CAUSING A PARSE > ERROR*** > $navname = $navbar[$nav]; > > > I then want to include the file $pagename.inc in the main frame, and > $navname.inc in side.php > > > Cheers, > > > Martin :0) > > == > Musical Director > University of York Gilbert & Sullivan Society > 177 Hull Road, York YO10 3JY > 01904 427 537 / 07951 015 220 > [EMAIL PROTECTED] > http://www.mixermanic.co.uk > == > > > -- > 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] > -- 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]
[PHP] Including file...
I seem to be making a mistake somewhere... # Define the navigation bar array $navbar = array("navmain", "info", "music", "orch", "synth", "syntype", "audio", "recordings"); # Define the pages in arrays by section $main = array("home"); $info = array("infomain", "about", "contact", "guestbook"); $music = array("musicmain", "musprologue", "mus1", "mus2", .., "mus28", "musepilogue", "musbows", "musplayout"); $orch = array("orchmain", "strings", "brass", "woodwind", "percussion", "rhythm"); $synth = array("synthmain", "part", "patches"); $synthtype = array("synthtypemain", "dx7", "k2000", "k2vx", "k2500"); $audio = array("audiomain", "synth"); $recordings = array("recordingsmain", "reccompare", "olc", "obc", "csr", "tac", "lon97"); # Store the arrays in an array $sections = array("&$main", "&$info", "&$music", "&$orch", "&$synth", "&$synthtype", "&$audio", "&$recordings") # Create the name of the .inc file $pagename = $sections[$sect][$page]; # ***THIS LINE IS CAUSING A PARSE ERROR*** $navname = $navbar[$nav]; I then want to include the file $pagename.inc in the main frame, and $navname.inc in side.php Cheers, Martin :0) == Musical Director University of York Gilbert & Sullivan Society 177 Hull Road, York YO10 3JY 01904 427 537 / 07951 015 220 [EMAIL PROTECTED] http://www.mixermanic.co.uk == -- 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]