Jump to content

laavanya14

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

laavanya14's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=365123:date=Apr 15 2006, 12:42 PM:name=Laavanya)--][div class=\'quotetop\']QUOTE(Laavanya @ Apr 15 2006, 12:42 PM) [snapback]365123[/snapback][/div][div class=\'quotemain\'][!--quotec--] hi thanks for the reply. is it possible i can only turn off errors just from one particular script?? [/quote] solved it :p just put error_reporting(0) for that page :D
  2. [!--quoteo(post=365118:date=Apr 15 2006, 12:14 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 15 2006, 12:14 PM) [snapback]365118[/snapback][/div][div class=\'quotemain\'][!--quotec--] If you are getting warning messages then you will want to get them sorted out otherwise you script will not work as you expect it to. If you want to turn your errors off you'll need to access to your php.ini file and turn [b]display_errors[/b] (located near line 357) to Off. [/quote] hi thanks for the reply. is it possible i can only turn off errors just from one particular script??
  3. Hi Guys, How do I off the php warning message from being displayed? thank you very much.
  4. [!--quoteo(post=364751:date=Apr 14 2006, 05:59 AM:name=bonaparte)--][div class=\'quotetop\']QUOTE(bonaparte @ Apr 14 2006, 05:59 AM) [snapback]364751[/snapback][/div][div class=\'quotemain\'][!--quotec--] Please keep reading this till I get time to write the complete code for you. [a href=\"http://in2.php.net/preg_match\" target=\"_blank\"]http://in2.php.net/preg_match[/a] and [a href=\"http://www.google.co.in/search?q=regular+expressions\" target=\"_blank\"]http://www.google.co.in/search?q=regular+expressions[/a] [/quote] hi again..thank you very much again. i would check it out. i just dont understand how to set the conditions for the pattern thing inside the preg_match statement
  5. [!--quoteo(post=364746:date=Apr 14 2006, 05:46 AM:name=bonaparte)--][div class=\'quotetop\']QUOTE(bonaparte @ Apr 14 2006, 05:46 AM) [snapback]364746[/snapback][/div][div class=\'quotemain\'][!--quotec--] See if this works for you: $mystring = "this is a include('test.php'). I would like to test include('pooh.php'); "; $pattern = "/([a-z])*\.php/"; $subject = $mystring; preg_match_all($pattern, $subject, $matches); print_r($matches); Sorry, the below code seems to be more effective: $mystring = "this is a include('test.php'). I would like to test include('pooh.php'); "; $pattern = "/[a-zA-Z]+\.php/"; $subject = $mystring; preg_match_all($pattern, $subject, $matches); print_r($matches); foreach ($matches as $value) { $targetarray = $value; } echo "<br> target array "; print_r($targetarray); [/quote] helo, thank you so very much. however there is a constraint here. i only want the statement printed if it is inside the include statement. besides it not neccesary be a php file. it might be a html file. the particular code would even print out even if the filename isnt inside the include function. basically what i am trying to do here, is to parse the string and check for the included files. thanks again
  6. Helo thanks for the reply. Assuming i have a [code]$mystring = "this is a include('test.php'). I would like to test include('pooh.php'); " [/code] so i want all the filename inside the include in the string in an array is possible. meaning array[0] = test.php array[1] = pooh.php thanks in advanced
  7. Hi Guys, I would to know how to find for a particular keyword in a string. Example, i would like to have all the the words include('XXXX') in the string in an array. It doesnt matter what is inside the bracket of the include statement I checked out the preg_match manual, but not really sure how to use it. Thanks in advanced.
  8. Hi Ya,thats what i am doing normal. For every requested page, I parse to check if there is include or require statements..... thanks aloooot anyway
  9. Helo again. I realize the if i include files, the php doesnt treat it like another file request. Meaning, the auto prepend file is not being executed before...... assuming in page1.php i have [code]<?php           include('page3.php');         ?> [/code] thus if i have auto_prepend page2.php, it does not get executed before calling of page3. Can I solve this problem???
  10. Hi Guys, I partially manage to solve my problem by using auto_prepend_file and $_SERVER('PHP_SELF'); if auto_prepend my AuthenticationModule and inside that script i write $filename=$_Server('PHP_SELF')) i can get my calling script. assuming i have page1, AuthenticationModule, page3. in page1, i have a link [code]<a href="page3.html">Page3</a>[/code], then the solution works fine. however, if in page1, instead of link i have [code]include('page3'); [/code] then in my AuthenticationModule, [code]$filename=$_SERVER('PHP_SELF'); [/code] then filename would be page1, instead of my requesting page, which is page3. Is there anyway i can solve this problem for include file situations?
  11. [!--quoteo(post=363031:date=Apr 9 2006, 11:37 AM:name=SomeGuy1337)--][div class=\'quotetop\']QUOTE(SomeGuy1337 @ Apr 9 2006, 11:37 AM) [snapback]363031[/snapback][/div][div class=\'quotemain\'][!--quotec--] ok if you preappend Auth.php (or the filename doenst matter.) browser requests [a href=\"http://site.com/mypage.html?var=value\" target=\"_blank\"]http://site.com/mypage.html?var=value[/a] you site will run auth.php from auth.php: basename($_SERVER["PHP_SELF"]) = mypage.html $_GET['var'] = 'value' at this point i hvae to say i have not peronsaly used the preappend and append php.ini settings. but to my knwoladge they shud perform just as if you had used include "preappend.php" inside mypage.html setup your authmodule to echo those variables and set it as the preappend file if all goes well when you access football.html?var=value it should show you those values try setting this up it shud solve your problem. [/quote] hi, by doing basename($_SERVER["PHP_SELF"]) , it works only for normal link call, however if i doing include('football.html'), it doesnt show football.html instead the page calling include file
  12. ok assuming in my html page now, i am calling Football.html. before apache displays the requested page, I want it to execute my php script which i have written (AuthenticationModule.php) I also want it to pass the requested page filename (in this case, Football.html) to my script In my script, I am accepting the filename parameter using GET. However i am willing to change the way i accept the parameter, if needed too. Once processed, the requested page is displayed. Just to let you know what AuthenticationModule is doing, it verifies the intergrity of the page. Once verified, the normal process goes, meaning the page is displayed. This is for my university project. I am suppose to do an AuthenticationModule which verifies webpages before displaying it. So I have already done the module but now I am not sure how to link it for every request The easy but not so good way would be [code]a href='authenticationmodule.php?file=football.html'[/code] but in this case, i need to change each and every link which is not good in the design part of my system. i just would like to make it one main configuration change and it does for every link. Thanks in advance...Help really needed
  13. [!--quoteo(post=362976:date=Apr 9 2006, 08:36 AM:name=SomeGuy1337)--][div class=\'quotetop\']QUOTE(SomeGuy1337 @ Apr 9 2006, 08:36 AM) [snapback]362976[/snapback][/div][div class=\'quotemain\'][!--quotec--] auto_prepend_file auto_append_file these are in the php.ini config file and you can use basename($_SERVER["PHP_SELF"]) to get just the filename and strip the direcotry [/quote] hey using auto_prepand_file, would it work if my requested page is html???? my script name is AuthenticationModule, n in my script i am accepted the requested page filename using GET method. if there is any other way of accepting, i dun mind changing. auto_prepand_file ="c:/Apache/include/AuthenticationModule.php?filename+($_SERVER["PHP_SELF")) is that how i do it??
  14. [!--quoteo(post=362945:date=Apr 9 2006, 03:30 AM:name=Honzoo)--][div class=\'quotetop\']QUOTE(Honzoo @ Apr 9 2006, 03:30 AM) [snapback]362945[/snapback][/div][div class=\'quotemain\'][!--quotec--] Just have more types assigned to PHP. For example, if you want html and html files to be parsed by PHP, just add the following to httpd.conf: [code]AddType application/x-httpd-php .htm .html[/code] The requested filename will be in the variable $_SERVER["PHP_SELF"] [/quote] Hi, but how do i automatically call another script?? and how do i pass the requested filename to it, even if it is html file.. sorry if it a silly question but desperate for help :p thanks alooooooooot
  15. Hi Guys, I have a problem and really need help asap. I am using Apache web server. I would like to know how to make the apache execute my PHP script automatically for every page request (whether php or html pages). at the same time, it has to pass the requested page filename to my PHP Script. I hope somebody can really help me. I am newbie to this kind of stuff. Thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.