| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Comments:
<0> however <1> Maniaman: You do!? <1> Maniaman: Which version of PHP is this? <0> would it have something to do with the fact that the way its working is file1.php includes file2.php, which sets $inc_message and includes message.php? <1> Maniaman: Did you try my example? <1> Maniaman: And did you still get the error? <1> Maniaman: And no, it shouldn't have anything to do with that. <2> Have anyone implemented IF statments into their template system before ? <0> joh: no error with your example <1> Lafa: I really don't see why you want to do that. PHP is in *itself* suitable as a template IMHO. <1> Maniaman: Then you're doing something with $inc_message which you haven't informed me about ;) try simplifying your problem. <0> hmm <0> nothing is unsetting it <2> joh, why use template system or why have IF statments in the system ? <1> Lafa: Why use a template system at all, when you can just use PHP? <3> PHP is a tplsys
<1> itrebal: That's my point :) <2> joh, like the Smarty tpl enging says: "One of Smartys primary design goals is to facilitate the separation of application code from presentation." <1> Lafa: Well, you don't do that by implementing PHP code in your custom template system, do you? <0> joh: editprofile.php: http://rafb.net/paste/results/MHPYyz69.html login.php: http://rafb.net/paste/results/fNjGaY72.html message.php: http://rafb.net/paste/results/NxsD6p22.html <0> editprofile.php includes login.php, which sets $inc_message and includes message.php <2> joh, yes you do ;) but i prefer using a template system than having php code in the templates <1> Lafa: No you don't, if (expr) {... } *is* application code. <2> joh, don't i prefer using template system ? <3> where is the name Rasmus from? <4> my pants. <3> ah, makes sense now <4> yep <3> but really <4> i'm serious. <1> Lafa: Sigh, you argued that you needed a template system to seperate application code from presentation. <1> Maniaman: put up global.php too please. <2> joh, yes. i thought you ment to have html code inside the php code. <0> joh: http://rafb.net/paste/results/7rebjY83.html <1> Lafa: Well, implementing if-statements in a template engine goes against that principle. <1> Maniaman: As far as I can see, $site_path is not set in inc/login.php... <0> hmm <2> joh, it might, me personaly don't need that. but im not going to be the only one using it. others might fint it handy. <0> message.php is still being included though <0> and I tried it with the actual location, isntead of using $site_path <0> same error <1> Maniaman: Yes, which is why I suspect there are more included files. <1> Maniaman: Try simplifying, please. <0> joh: there is index.php which is including editprofile.php http://rafb.net/paste/results/05DoPU90.html <1> Maniaman: Have you tried running login.php directly? <5> Inside of a function, When In try to close a file, php says that "close()" is undefined <1> slake: that's because it doesn't exist. <1> slake: try fclose() <0> joh: yeah, still giving me undefined variable errors <1> Maniaman: which variables are undefined now? <0> $inc_message <5> Ok.. <0> and $site_path, but when I replace it with the actul path of the site the $site_path error goes away. <5> Why wouldn't close() exist in my function's scope? <5> It exists when I use it normally <1> Maniaman: Try removing the 2nd line of login.php (error_reporting ...) <1> slake: No it doesn't. <1> slake: Unless you've defined it yourself. <0> joh: still nothing <1> Maniaman: Same error? <0> yeah <1> Maniaman: Then remove session_start() <1> and the if-statement <0> same error <1> Maniaman: I can't see why PHP doesn't complain about $site_path not being set. <0> I removed it and used the actual path of the site <1> Maniaman: Ok, now reduce login.php to: $inc_message = "Foo"; and message.php to: echo "message: $inc_message"; <0> Notice: Undefined variable: inc_message in /var/www/html/projects/element/inc/message.php on line 2 <0> message: <1> Maniaman: so *that* doesn't work, but my previous example did!? <0> yeah <0> which is rather odd. <1> Maniaman: It is, now *all* you have are two files, right? <0> inc/login.php and inc/message.php <0> I'm accessing login.php directly <1> Maniaman: inc/login.php: <?php $inc_message = "foo"; include("message.php"); ?> inc/message.php: <?php echo "message: $inc_message"; ?> <1> Maniaman: Am I correct?
<0> it has 4 lines of code to set $inc_message and include message.php, message.php has 3 lines of code to echo it (including the <? ?>) <0> yeah <0> aaah wait <0> the include() for message php had the full site path <0> when I removed the site path and just used include('message.php'); it worked <1> well, if login.php and message.php are in the same directory, it shouln't matter. <0> hmm <0> well it seems to be working now that I just have include('message.php'); instead of include('http://mywebsite/inc/message.php'); <1> Maniaman: You can't include a file by url <0> you cant? <6> Anyone using XUL w/ PHP? <0> that explains why stuff acts weird when I do that then <1> yeah :p <0> ah <0> it works if I do $site_path="/var/www/html/etc"; <0> thanks a ton :) <1> Maniaman: np :P <0> Is there a way to tell if a file is included? <0> so I don't end up including global.php or something similar multiple times <7> can i somehow delete empty lines in a file ? <8> coca: file(file); array_filter(); file_put_contents(); <7> aidan: thx for the hint <7> :) <1> Maniaman: include_once() or require_once() <1> nite <9> Hi. How do you p*** arguments form the command line? I can't find a reference to this in the docs ... <10> php [file.php] arg1 arg2 arg3 <11> seannerd, $argc and $argv[] <6> $argv? <9> Ah - they turn into an arry - $argv[ ] - I don't have to define this, it becodes available? <10> right <9> Sweet! <9> Thanks so much! <6> anyone using PHP w/ XUL? <12> if someoen can help me out... i can't get php to compile the shared object files. i configure with --enable-shared but when i compile, no .so files. <13> how do you p*** "$_GET" parameters on the commandline? <8> ttick_: php.net/cli <13> ah, found it. Thanks aidan <14> can anyone help me with "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING" ? <15> can anyone please help me with a problem in my php script getting data from mysql? <15> i have used the script before but its just not working now <15> i will let you view the php code if you think you can help me <15> so ill take that as a no then <15> ok bye <16> Sacro: You have a parse error. Look at the line(s) before the one PHP reported for missing symbols. <14> TML: im trying to copy of a tutorial, but the pdf isnt brilliantly easy to read <3> oh man, i like new beta2 of Gaim <17> mrturtle, whats up ? <18> hey <18> what would I use instead of include() for fetching a page on another server? <16> cvncpu: include <18> err <16> cvncpu: Yes? <18> well I am doing include("http://kernel.org/kdist/finger_banner"); to get the latest Kernel stats <18> and it is giving me errors <16> What sort of error? <19> raden, just doing some reading and watching the olympics <18> Warning: main(): URL file-access is disabled in the server configuration in /home/charles/public_html/irc/index.php on line 49 <18> there are 2 more too <17> mrturtle, ahh havent seen you on for a while <20> what is the website where I can post my php code so people can help me out with the problems that I am having. <16> cvncpu: When URL file-access is disabled, you won't be able to read files from URLs <18> there is also an RSS (XML) feed in the dir, can I use PHP to get that, so I can use from the list what I want? <16> cvncpu: Not via include, not via file, not via fopen, etc. <18> oh okay <19> I went out of town for the weekend <18> well there is an RSS feed, which I suppose is for using to grab info <17> kewl kewl <18> are there any methods to parse XML in PHP? <16> cvncpu: Your PHP is telling you it's not allowed to open remote files. So you won't be able to grab RSS, either. <18> oh oh <18> so it's my config fault <18> not something on the kernel.org server
Return to
#php or Go to some related
logs:
#css ubuntu vpc mouse not working pygame unsubscriptable object #css cannot create regular file ntfs gentoo ubuntu edge MP-BIOS install #ubuntu XML::Parser perl module is required for intltool gentoo
debian python-profiler license reason #web
|
|