f



Get date from text/php-file #2

Allright, thank you guys!!
I got it going.
Now i have another question;

Is there a way to link a date to a persons name,
so i can get the pop-up, and the pop-up
then automatically grabs the right name, and displays it?

Thanks in advance.,..
0
12/30/2003 10:04:56 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

11 Replies
973 Views

Similar Articles

[PageSpeed] 19

"krunkelgarten" <krunkelgarten@hotmail.com> wrote in message
news:8767e62e.0312301404.424614af@posting.google.com...
> Allright, thank you guys!!
> I got it going.
> Now i have another question;
>
> Is there a way to link a date to a persons name,
> so i can get the pop-up, and the pop-up
> then automatically grabs the right name, and displays it?
>
> Thanks in advance.,..


if your site is small, put them all in a flat text file, or if your site is
larger, put them in a database
 and have your popup script look up the date.

but a quick question, it seams like you already know the persons name,
becouse you have thier birthdate before you pop open the window, I assume
this is comming from some sort file.

so when you pop open the window, add the name to the script:
ie:
"MM_openBrWindow('http://www.nu.nl/script?$n=username','popup','width=300,he
ight=300')"


--
Mike Bradley
http://gzen.myhq.info  -- free online php tools


0
me1383 (446)
12/30/2003 11:25:03 PM
The site is quite small, i don't think a DB would be necessary..
But What i want is that the names are in the same line of the php-file
or something like that, because i want to give certain other people
acces to this file, and let them edit it online.. If the dates& names
are in one row, it's
the easiest for those other people..
Hope you understand..

Greetz Krunkelgarten
0
12/31/2003 9:58:45 AM
"krunkelgarten" <krunkelgarten@hotmail.com> wrote in message
news:8767e62e.0312310158.1ad1eb1c@posting.google.com...
> The site is quite small, i don't think a DB would be necessary..
> But What i want is that the names are in the same line of the php-file
> or something like that, because i want to give certain other people
> acces to this file, and let them edit it online.. If the dates& names
> are in one row, it's
> the easiest for those other people..
> Hope you understand..
>
> Greetz Krunkelgarten
I guess my question is, when the page runs, does it look through (what ever
style db you use, flat file, etc..)
and see if there is a matching date to the current date? )this way it
doesn't pop a window every day?

If so, then you must be reading the entire line, date w/ name, in this case,
pass the name to the pop window as I posted earlier.

--
Mike Bradley
http://gzen.myhq.info  -- free online php tools


0
me1383 (446)
12/31/2003 4:44:38 PM
Well, i'm not sure, if it runs through the entire line,
but the "datum.php" looks like this:

<?php
	// January
	$datum[] = '1 January';
	
	//February
	$datum[] = '...';
	
	// March
	$datum[] = '...';
	
	// April
	$datum[] = '...';
	
	// May
	$datum[] = '...';
	
	// June
	$datum[] = '...';
	
	// July
	$datum[] = '...';
	
	// August
	$datum[] = '...';
	
	// September
	$datum[] = '...';
	
	// October
	$datum[] = '20 October';
	
	//November
	$datum[] = '...';
	
	//December
	$datum[] = '...';
?>

What i want is something like this:
    	// January
	$datum[] = '1 January'; $person=John

So i can get a pop-up at the 1st, and then have the pop-up
window look for the right person, and display that person's name..
Hope you understand..

Greetz Krunkelgarten
0
1/2/2004 8:22:10 AM
"krunkelgarten" <krunkelgarten@hotmail.com> wrote in message
news:8767e62e.0401020022.9af0d88@posting.google.com...
> Well, i'm not sure, if it runs through the entire line,
> but the "datum.php" looks like this:
>
> <?php
> // January
> $datum[] = '1 January';
>
> What i want is something like this:
>     // January
> $datum[] = '1 January'; $person=John
>
> So i can get a pop-up at the 1st, and then have the pop-up
> window look for the right person, and display that person's name..
> Hope you understand..
>
> Greetz Krunkelgarten

I do understand, but what I dont understand is why you do not grab the name
when you  grab the date? so when you pop open the window, you send the name
with it. instead of going through the file, checking dates, finding a
matching one, poping a window, and having that same window look through and
pull the name from the exact same point that triggered the window pop.

first let me ask, is this file format set in stone?

if not, and you still want to keep it super simple
try this
// jan 1
$datum['01/01'] = "persons name";  // but this only works if you have no
dups
is this a birthday pop up? or like some famous person in this day?

you could do something like
$datum[1][1] = "person name for jan 1";
$datum[1][23] = "person name for jan 23";
...
...

then on your index page, include() this file,
and do this:

$person = $datum[$date("n")][$date("j")];
if ($person != "")
    {
    print html_pop_window_code;
    }

please use a cookie, so the user doesn't get anoyed by the same window
poping up everytime they look at your index page.
you could set a cookie like setcookie("popperson",$person);
then modify the if to read:

if ( ($person != "") && ($_COOKIE['popperson'] != $person) )

--
Mike Bradley
http://gzen.myhq.info  -- free online php tools


0
me1383 (446)
1/2/2004 10:05:29 AM
Hi Count Scubula,

I tried everything what you wrote, but i couldn't get it to work..
Since i'm quite new to PHP, i even didn't understand some of your
sentences:
"first let me ask, is this file format set in stone?",
"but this only works if you have no dups".

The site i'm making is for a local(womens) soccer-team,
and the pop-up should come when one of the team-members has it's
birthday...

So my problem is still trying to get the pop-up with the name.
What i have is one php-file called datum.php:
 
<?php
 // January             
$datum[] = '2-1';
?>
 
In my index.php there is this in the body-tag:
<?php $today =date("j-n"); if (in_array($today, $datum)) { print
"onLoad=".$g_birthday_pop;}?>

$g_birthday_pop looks like this:
  $g_birthday_pop   = <<<EOT
"MM_openBrWindow('../pop-up.php?persoon=test','dames3','width=300,height=300')"
EOT;
 
You can see what way i want to tell the pop-up.. (persoon)
I really hope you can help me out...

And what it comes to the cookie, i don't expect visitors to visit the
site more than once a day...
 
Best wishes, and greetz, Krunkelgarten
0
1/2/2004 8:40:39 PM
"krunkelgarten" <krunkelgarten@hotmail.com> wrote in message
news:8767e62e.0401021240.5727e5e4@posting.google.com...
> Hi Count Scubula,
>
> I tried everything what you wrote, but i couldn't get it to work..

> What i have is one php-file called datum.php:
>
> <?php
>  // January
> $datum[] = '2-1';
> ?>
>
> In my index.php there is this in the body-tag:
> <?php $today =date("j-n"); if (in_array($today, $datum)) { print
> "onLoad=".$g_birthday_pop;}?>
>
> $g_birthday_pop looks like this:
>   $g_birthday_pop   = <<<EOT
>
"MM_openBrWindow('../pop-up.php?persoon=test','dames3','width=300,height=300
')"
> EOT;
>

ok lets keep it realy simple:
make only this one modification to your datum file
<?php
 // January
$datum['persons name'] = '2-1';
?>

make these changes to your index

> <?php $today =date("j-n"); if (in_array($today, $datum)) { print
> "onLoad=".$g_birthday_pop;}?>
>
> $g_birthday_pop looks like this:
>   $g_birthday_pop   = <<<EOT
> "MM_openBrWindow('../pop-up.php?persoon={array_search($today,
$datum)},'dames3','width=300,height=300')"
> EOT;
>


--
Mike Bradley
http://gzen.myhq.info  -- free online php tools


0
me1383 (446)
1/3/2004 6:00:16 AM
Hi there,

Again, i tried all of it,
but it still doesn't work;
I changed the datum.php file:
- // January
  $datum[Krunkelgarten] = '3-1';

I changed the index, and the $g_birthday_pop...
The result is still a pop-up, but where the 
person's name should be, i get:
- {array_search(, )}

And the title of that page is: 
- pop-up.php?persoon={array_search(,%20)}

I really don't get it why it doesn't work...
I think the error is somewhere in the birthdaypop,
because i think there should be some sort of php
brackets in between there!? Now it looks like this:
-   $g_birthday_pop	  = <<<EOT
"MM_openBrWindow('../pop-up.php?persoon={array_search($today,
$datum)}','dames3','width=300,height=300')"
EOT;

I'd think that there should be something after persoon= and after
$datum)}
But (of course) <?php   ?> doesn't work there.. Please help me out..

Greetings, Krunkelgarten
0
1/3/2004 12:53:07 PM
"krunkelgarten" <krunkelgarten@hotmail.com> wrote in message
news:8767e62e.0401030453.12ea2491@posting.google.com...
> And the title of that page is:
> - pop-up.php?persoon={array_search(,%20)}
> ......
> ......
> Greetings, Krunkelgarten

Sorry my fault, I was typeing the reply, and had to leave, so I closed it
and typed it up again real quick
when I got home.

> Again, i tried all of it,
> but it still doesn't work;
> I changed the datum.php file:
> - // January
>   $datum[Krunkelgarten] = '3-1';
>

parts should read with quotes
$datum["Krunkelgarten"] = '3-1';

and

> "MM_openBrWindow('../pop-up.php?persoon={array_search($today,
$datum)},'dames3','width=300,height=300')"

should be
$g_birthday_pop   = "MM_openBrWindow('../pop-up.php?" .
                                "person=" .
urlencode(array_search($today,$datum))  .
                                ",'dames3','width=300,height=300')";


--
Mike Bradley
http://gzen.myhq.info  -- free online php tools


0
me1383 (446)
1/3/2004 9:17:41 PM
I'm really sorry, but it still doesn't work..
I get an error: 
Parse error: parse error in /var/www/html/include/settings.php on line 8

Line 8 looks like this:
urlencode(array_search($today,$datum))  .

I tried it with the "<<<<EOT" part, and without, but it just doesn't work... 
:s

Greetings Krunkelgarten
0
1/4/2004 2:39:29 PM
hmm, this worked for me, what does line 7 look like?

--
Mike Bradley
http://gzen.myhq.info  -- free online php tools
"krunkelgarten" <krunkelgarten@hotmail.com> wrote in message
news:8767e62e.0401040639.424ad107@posting.google.com...
> I'm really sorry, but it still doesn't work..
> I get an error:
> Parse error: parse error in /var/www/html/include/settings.php on line 8
>
> Line 8 looks like this:
> urlencode(array_search($today,$datum))  .
>
> I tried it with the "<<<<EOT" part, and without, but it just doesn't
work...
> :s
>
> Greetings Krunkelgarten


0
me1383 (446)
1/4/2004 10:04:26 PM
Reply:

Similar Artilces:

Get date from text/php-file
Hi there, I'm new to PHP, and i want to create a pop-up (on page load) on certain dates.. What i have is the script for the pop-up: <body scroll="auto" <?php $today =date("d-F"); if ($today==$datum) {echo "onLoad=".$g_birthday_pop;}?>> The pop-script = $g_birthday_pop = <<<EOT "MM_openBrWindow('http://www.nu.nl','popup','width=300,height=300')" EOT; $datum is in another file (include/datum.php): <?php $datum = "30-December"; ?> And this works if the date is 30th of December, but i want it too on other dates that you put in $datum Something like: <?php $datum = "30-December";"10-March"; ?> So i want to control the pop-up just by editing the "datum.php"-file Thanks in advance, Greetings Krunkelgarten krunkelgarten escribi�: > Hi there, > > I'm new to PHP, and i want to create a pop-up (on page load) on certain dates.. > What i have is the script for the pop-up: > > <body scroll="auto" <?php $today =date("d-F"); if ($today==$datum) > {echo "onLoad=".$g_birthday_pop;}?>> > > The pop-script = > $g_birthday_pop = <<<EOT > "MM_openBrWindow('http://www.nu.nl','popup','width=300,height=300')" > ...

want to get content of one php file in another php file
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?> </body> this is reading abc.php file in which i m simply using an echo statement. When i execute ex1.php file i cant see the php statement of abc.php file content of abc.php file is <?php echo "hello";?> sarika wrote: > i have one php file having content > > Contents of ex1.php file > <body> > <?php > $content = "c://webserver/www/abc.php"; > $handle = fopen($content, "r"); > echo fread($handle,filesize($content)); > ?> > </body> > this is reading abc.php file in which i m simply using an echo > statement. When i execute ex1.php file i cant see the php statement of > abc.php file > > content of abc.php file is > <?php echo "hello";?> That's interesting, I've found out that it's the browser that's hiding <?php ?> tags within .phpx pages. Probably to avoid short tags scripts (on a server that doesn't allow them) from getting leaked by visitors who don't know about this browser trick, until the dev' realizes his error. Not a good thing, IMO; dev's should take care, themselves, and it's still not secure since the hidden string is still in the rendered source. And now we don't know how ...

Failed opening required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files\PHP\PEAR\Text\CAPTCHA.php on line 22
Hi, Guys=EF=BC=8Cwhen I run my site ,I got some errors: Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in F:\Program Files\PHP\PEAR \Text\CAPTCHA.php on line 22 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path=3D'F:\www\include') in F:\Program Files \PHP\PEAR\Text\CAPTCHA.php on line 22 It appears that it cann't find the pear.php ,but i checked my dir,and this file was there,and also I have my php.ini file checked,the include_path=3Dinclude_path=3D".;F:\Program Files\PHP\pear;F:\www \include" ,it looks all right,was there anything I have missed in the config file?Or something wrong ? Wish somebody can help me out. Thanks, Mikay >Warning: require_once(PEAR.php) [function.require-once]: failed to >open stream: No such file or directory in F:\Program Files\PHP\PEAR >\Text\CAPTCHA.php on line 22 >Fatal error: require_once() [function.require]: Failed opening >required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files >\PHP\PEAR\Text\CAPTCHA.php on line 22 So where is the pear.php file? >It appears that it cann't find the pear.php ,but i checked my dir,and >this file was there,and also I have my php.ini file checked,the >include_path=include_path=".;F:\Program Files\PHP\pear;F:\www >\include" ,it looks all right,was there anything I have missed in the >config...

testing PHP 5 with Apache 2 and php info file
When I go to look for php info file in the browser all i get is the actually words. <?php phpinfo(); ?> any obvious problems? thanks ...

testing PHP 5 with Apache 2 and php info file
When I go to look for php info file in the browser all i get is the actually words. <?php phpinfo(); ?> any obvious problems? thanks ...

PHP 4.2.2 and php://stdin
Hello, I am using php 4.2.2 in Red Hat 9.0 with apache 2.0.40 I try to build a php script that accepts POST requests that contain multimedia data and shoves them in a MySQL database. My problem is that it seems that I cannot read the POST data from stdin. I created the following php script to test it: <?php $in = fopen("php://stdin", "rb"); $line = fread($in, 10); echo "Content-type: text/plain\n\n"; echo "len=".strlen($line)." OK\n"; ?> and however I try to POST a file either with cURL (curl --data-binary @file http://....) or with netcat (nc host port, ...) what I get back is len=0 OK i.e. no data are read! Any ideas? Thanks! Stelios G. Sfakianakis wrote: > Hello, > I am using php 4.2.2 in Red Hat 9.0 with apache 2.0.40 I try to build a > php script that accepts POST requests that contain multimedia data and > shoves them in a MySQL database. My problem is that it seems that I > cannot read the POST data from stdin. > > I created the following php script to test it: > > <?php > > $in = fopen("php://stdin", "rb"); > $line = fread($in, 10); > echo "Content-type: text/plain\n\n"; > echo "len=".strlen($line)." OK\n"; > > ?> > > and however I try to POST a file either with cURL (curl --data-binary > @file http://....) or with netcat (nc host port, ...) what I get back is > > len=0 OK > &...

Getting a file via http or evaluating a php file and getting its output
I need to somehow merge two separate web programs written in php together (from the user's perspective). This solution won't be perminant, I just need something done quickly. I was thinking of two different approches. One would be to download a processed version (modified so it will create validating html with the page it's being embeded in) of one of the programs with the other, then just use print to embed it in the page. I couldn't find out how to get a file via http here (http://us2.php.net/manual/en/index.php). Sorry if I missed this in the docs. The other would be to process the other program and get it's command line output, and print that. If there's a better way to this, I'd be glad to hear it :) Also, I've never written any php before; so sorry if I missed something obvious to someone who has. Hello, On 10/25/2004 04:10 PM, Brian Peyton wrote: > I need to somehow merge two separate web programs written in php > together (from the user's perspective). This solution won't be > perminant, I just need something done quickly. I was thinking of two > different approches. > > One would be to download a processed version (modified so it will > create validating html with the page it's being embeded in) of one of > the programs with the other, then just use print to embed it in the > page. I couldn't find out how to get a file via http here > (http://us2.php.net/manual/en/index.php). ...

php-mcrypt module for php-4.2.2 ?
Hi I am looking for the above as my php version (Redhat) is that. Call me lazy, but I do not wish to compile php unless it becomes absolutely necessary, as it has been working fine so far. I have searched google for it, but to no avail so far. Does anyone know a source for it ? Upgrading to 4.2.3 is an option, but it will require upgrading large chunks of my installation that I do not have a problem with. Thanks, MS ...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my .php files. For example, if I type >"php phpinfo.php" , this works fine on my system. > >If I put the phpinfo.php file is in /var/www/html and I try to access >it through the browser, I get the content of the file and not the >execution of the file. Instead of display the info of PHP, I got the >text of the file as: > ><?php > phpinfo(); >?> > > >Why? >Thanks Do you have a webserver such as Apache running on the machine where you expect this to happen? Because it's the webserver, not the browser, that needs to know about php. The browser only does html. Margaret -- (To mail me, please change .not.invalid to .net, first. Apologies for the inconvenience.) "Phong Ho" wrote: > I have this problem with PHP that someone might be able to help. > > With CLI, I am able to execute my .php files. For exam...

PHP subroutine
Below is a subroutine built from code I found at PHPFreaks, and it works just as I'd expect it to. It lists all the files in a directory and creates links to them. I use it in a directory where each page is named for an animal, and the page profiles that pet. What I'd like to be able to do is create a separate text file in the same directory, with bits of information about each pet, then, have that information added on the same line as their link page. So, right now the list looks something like this: o fido.txt o mittens.txt o slither.txt What I'd like to be able to do is have a text file with lines this: slither.txt - my brand new Boa fido.txt - a 12 year-old English Bulldog. mittens.txt - my son's cute and fluffy kitten sylvester.txt - a black and white cat given to my cousin Then, when it displays on the page, I'd like it to display like this: o fido.txt - a 12 year-old English Bulldog. o mittens.txt - my son's cute and fluffy kitten o slither.txt - my brand new Boa The two elements that are important (other than getting the info line at all) is that the list in the text file can be in any order, and that entries could be in there that don't have link pages and they shouldn't be displayed. <?php // Links creating script taken from: http://www.phpfreaks.com/tutorials/146/0.php // Originally added October 21st, 2007 // Modified by Jenny Purcell to be a subroutine to call it multiple times. function make_links($dir) { //...

php degugger on php 5.2.2 (xampp 1.6.2) real brainer
Hi, I tried to get php dbg debugger working on my machine but it doesn't work at all. Ok, what i did: copied php_dbg-5.2.x.dll (for PHP 5.2.x version) into my xampp/php/ext directory next, modified /xampp/apache/bin/php.ini file appending: [debugger] extension=php_dbg-5.2.x.dll debugger.enabled=on debugger.profiler_enabled=on debugger.hosts_allow=localhost 127.0.0.1 ;debugger.hosts_deny=ALL debugger.ports=7869, 10000/16 debugger.JIT_host = clienthost debugger.JIT_port = 7869 Now, when i restard my server and try to get http://localhost my apache crashes and windows gives me a window telling me that this application will be closed !@!! what is wrong ? im running windows xp sp2 thanks in advance Piotr Nowak pisze: > Hi, > > I tried to get php dbg debugger working on my machine but it doesn't > work at all. > > Ok, what i did: > > copied php_dbg-5.2.x.dll (for PHP 5.2.x version) into my xampp/php/ext > directory > next, modified /xampp/apache/bin/php.ini file appending: > > [debugger] > extension=php_dbg-5.2.x.dll > debugger.enabled=on > debugger.profiler_enabled=on > debugger.hosts_allow=localhost 127.0.0.1 > ;debugger.hosts_deny=ALL > debugger.ports=7869, 10000/16 > debugger.JIT_host = clienthost > debugger.JIT_port = 7869 > > > Now, when i restard my server and try to get http://localhost my apache > crashes and windows gives me a window telling me that this application >...

I need to create html files from php files using php
I am very new to PHP, although I have been using ASP for a few years. I use a product in ASP called ASPTear, it's a small dll that my hosting company happens to have loaded. Basically you can set up a function that you can pass an ASP page to and it will read the ASP and write out an HTML file. I use this to save load on the server and speed up my site, I have a few include files that look up data and then present it, this data does not change very often, so I run a routine called rebuildhtml.asp that will call a few ASP files and create HTML versions. I am now converting the site to PHP as I want to use mod_rewrite, what I need is a routine that I can pass a php file to and end up with an HTML version. For example rewrite(somefile.php) Will create somefile.html I am sure this can't be too difficult, but as a newbie I cannot find out how to do it. Any help appriciated. Dennis Dennis wrote: > what > I need is a routine that I can pass a php file to and end up with an > HTML version. > > For example > > rewrite(somefile.php) http://www.php.net/ob_start Happy Coding :-) -- USENET would be a better place if everybody read: | to mail me: simply | http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this post, | http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain text | http://www.expita.com/nomime.html | and *NO* attachments. | Dennis wrote: > I am now converti...

PHP file 'Hello.php" is not writing anything when run through IE 6.0.2
Hi ! Out there, anybody could help tell me what could be the reason that my php scripting is not giving output in IE6. Which I'm trying from my webserver itself, having IIS 5 on W2k Advanced server. I have updated registry HKLM\SOFTWARE\PHP with Per se directory with value of C:\Inetpub\wwwroot. Still it's not saying 'Hello' to the world :) Can anybody guide me to the correct reason / resolution. Thanks in anticipation. Vasu Vasu wrote: > Hi ! > > Out there, anybody could help tell me what could be the reason that my > php scripting is not giving output in IE6. Which I'm trying from my > webserver itself, having IIS 5 on W2k Advanced server. > > I have updated registry HKLM\SOFTWARE\PHP with Per se directory with > value of C:\Inetpub\wwwroot. > > Still it's not saying 'Hello' to the world :) > > Can anybody guide me to the correct reason / resolution. Are you using "C:\Inetpub\wwwroot" as address for the browser? -- Freundliche Gr��e, Franz Marksteiner On Feb 24, 3:55=A0pm, "Franz Marksteiner" <franzmarkstei...@gmail.com> wrote: > Vasu wrote: > > Hi ! > > > Out there, anybody could help tell me what could be the reason that my > > php scripting is not giving output in IE6. =A0Which I'm trying from my > > webserver itself, having IIS 5 on W2k Advanced server. > > > I have updated registry HKLM\SOFTWARE\PHP with Per se directory...

Open .php file with PHP Designer 2007 by clicking the file in XP
In windows XP, I want to be able to click on a .php file and have it opened in PHP Designer 2007, Or right-click on it and have an "edit" menu option presented to me. I know how to tweak the registry to do this in general, but what would the command line look like in this specific case ? PHP Designer does not do this automatically. It is as if the program does not allow commandline options. It only opens with the last file used or a menu of recently opened files. ...

CSWS 2 (apache) / PHP 1.2 (php 4.2.3) / Oracle 9i OCI8 connectivity under OpenVMS
I'm currently trying to interface CSWS 2.0 (apache) / PHP v1.2 (PHP 4.3.2) with an Oracle 9.2 database under OpenVMS 7.3.2 The database connection works fine, but i've a problem with OCIexecute when i'm trying to select varchar value. My script works fine with int value, but give no resultt (error page) when there's a varchar colum in the select statement Someone Have exeprienced such problem ? Who can help me with APACHE/PHP/Oracle9I/OpenVMS configuration ? Environnement problem ? NLS problem ? Thanks in advance for all Best regards ...

Is a PHP variable supposed to be seen in a .js file included into a .php file
Is a PHP variable supposed to be seen in a .js file included into a .php file? I have a client side javascript code stored in a .js file which is included into a PHP file using <script src="filename.js></script> This code initialises a Javascript variable var u="string"; The string is supposed to be the value of $HTTP_HOST So, when initialise this variable like var u=<? echo $HTTP_HOST;?>; I sterted getting a javascript message Syntax Error Am I doing something wrong, or PHP variables are not seen in included js files? aa wrote: > Is a PHP variable supposed to be seen in a .js file included into a .php > file? > > I have a client side javascript code stored in a .js file which is included > into a PHP file using > <script src="filename.js></script> > > This code initialises a Javascript variable > var u="string"; > > The string is supposed to be the value of $HTTP_HOST > > So, when initialise this variable like > > var u=<? echo $HTTP_HOST;?>; > > I sterted getting a javascript message Syntax Error > > Am I doing something wrong, or PHP variables are not seen in included js > files? js files are not parsed for PHP code unless you specifically tell the webserver to do so. Therefore, "var u=<? echo $HTTP_HOST;?>;" in the .js will error since the browser doesn't know what to do. -- Justin Koivisto - spam@koiv...

PHP pre 4.2 VS. PHP post 4.2
My local PHP install (for development/learning) is 4.3, but my hosting service uses 4.0.6. Without turning on registered globals, is there a common way these two versions can handle form data? 4.0.6 doesn't have import_request_variable(), $_POST, or $_REQUEST, and 4.3 chokes on $HTTP_POST_VARS[]. Thanks Chris 4.3 shouldn't choke on HTTP_POST_VARS - one thing you have to watch out for, however, is that HTTP_POST_VARS is not superglobal, so if you use it in a function, you still have to say global $HTTP_POST_VARS; etc... perhaps this is the reason it 'chokes'? Chris wrote: > My local PHP install (for development/learning) is 4.3, but my hosting > service uses 4.0.6. Without turning on registered globals, is there a > common way these two versions can handle form data? 4.0.6 doesn't have > import_request_variable(), $_POST, or $_REQUEST, and 4.3 chokes on > $HTTP_POST_VARS[]. > > Thanks > > Chris ...

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXAMPLE 2*/ /*index.php*/ .... <?php include('global/includes/lastmod.php') ?> .... /*lastmod.php*/ .... <?php echo "This file was last modified: "; echo strftime("%A %B %d %Y"); include('whateverfilename.inc'); ?> ============================= I would like to be able to parse the include if it has php code, and in some cases, create nesting includes (an include within an include). Is this even possible? Any ideas? Any help is certainly appreciated. Thanks! Steven Borrelli Web Developer Kingswood School Steven Borrelli wrote: > Hello, > > I am using the <?php include() ?> statement on my website for > organizational purposes. However, one of my includes contains some > PHP code. Is there any way for the server to actually parse the > include? I've tried this before, and it did not parse the in...

i am getting the php coding while running the php..
i have information.php file that file contain following coding <?php echo phpinfo(); ?> while i calling the URL ("http://localhost/information.php"). i am getting the coding <?php echo phpinfo(); ?> not show the php information...... i am new to the php can you help me? <mekalai82@gmail.com> wrote in message news:ea7db46d-a03d-497a-b38b-c54d75f266f8@h11g2000prf.googlegroups.com... >i have information.php file that file contain following coding <?php > echo phpinfo(); ?> > while i calling the URL ("http://localhost/information.php"). > > i am getting the coding <?php echo phpinfo(); ?> <?php phpinfo(); ?> -- Richard On Feb 29, 11:30 am, "rf" <r...@invalid.com> wrote: > <mekala...@gmail.com> wrote in message > > news:ea7db46d-a03d-497a-b38b-c54d75f266f8@h11g2000prf.googlegroups.com... > > >i have information.php file that file contain following coding <?php > > echo phpinfo(); ?> > > while i calling the URL ("http://localhost/information.php"). > > > i am getting the coding <?php echo phpinfo(); ?> > > <?php phpinfo(); ?> > > -- > Richard for example i have that coding.......my coding is run in the some other machine. but while i am trying in my system i am getting the whatever i have typed in file.... that content will be displaying......... does not provide the result of that file coding.......

When does the php interpreter loads the php file?
Hi All, I'm wondering three facts about php, apache and apache module. 1.How can i differentiate the php intepreter if it's running as a apache module or as cgi? 2.When does the php interpretor loads the php file to main memory? 3.and till when it keeps the php file on memory? - in my experience only after installing Zend it caches the php file. Thak you *** Kim Gijung wrote/escribi� (20 Oct 2004 00:03:35 -0700): > 1.How can i differentiate the php intepreter if it's running as a > apache module or as cgi? If I recall correctly phpinfo() calls it "Server API". > 2.When does the php interpretor loads the php file to main memory? In a web page, when the file is requested. In a command line script, when the file is executed. > 3.and till when it keeps the php file on memory? Until the execution ends. > - in my experience only after installing Zend it caches the php > file. Right, if you aren't using a cache the file is not cached. -- -- �lvaro G. Vicario - Burgos, Spain -- Thank you for not e-mailing me your questions -- ...

How to invoke remote php file from php?
Hi, I have a local php file and I need to get info back from php file on the server. How do I invoke remote a php? I can access this remote php thru a simple url and it prints some info on the web page. How do I get this info back to store as a variable in local php? Regards, Alex. Alex wrote: > Hi, I have a local php file and I need to get info back from php file > on the server. How do I invoke remote a php? I can access this remote > php thru a simple url and it prints some info on the web page. How do I > get this info back to store as a variable in local php? > > Regards, > Alex. > See example 16-11 here: http://www.php.net/manual/en/function.include.php Alex wrote: > > I have a local php file and I need to get info back from php file > on the server. How do I invoke remote a php? I can access this remote > php thru a simple url and it prints some info on the web page. How do I > get this info back to store as a variable in local php? $info = file_get_contents('http://remoteserver.com/script.php'); Cheers, NC Carl & NC, Thank you very much!!! Both examples work great. Not precisely sure what you mean, something simple like this might do what you want: $contents = file_get_contents('http://www.site.com/alexs_page.php?param=1&id=2'); NC wrote: > Alex wrote: > >>I have a local php file and I need to get info back from php file >>on the server. How do I invoke remote a php? I...

php assembly of multiple php files
I am trying to combine multiple php pages into 1. Basically I have created a shell page and then a seperate php file for each form to be included within the shell. The problem I am having is that when a user submits one of the forms the main shell and the other php files POST values are all returned as NULL and I only get the values pertaining to the form that was submitted?. If all the files were combined into one very long php file, I would get all the POSTs returned how can I do the same but with multiple files? When you submit an include, do the POST values not get passed back to the Main calling page? Thank you, QB Question Boy wrote: > I am trying to combine multiple php pages into 1. > > Basically I have created a shell page and then a seperate php file for > each form to be included within the shell. > > The problem I am having is that when a user submits one of the forms > the main shell and the other php files POST values are all returned as > NULL and I only get the values pertaining to the form that was > submitted?. If all the files were combined into one very long php > file, I would get all the POSTs returned how can I do the same but > with multiple files? > > When you submit an include, do the POST values not get passed back to > the Main calling page? > > Thank you, > > QB This has nothing to do with PHP - it's how HTML works. The browser will only send the data for the form being subm...

Quoting PHP code in a .php file???
I am new to PHP and I want to quote the followong content into a Web page <html> <head><title>Connect Server</title></head> <body> <? $link = mysql_connect("localhost",$_POST['username'],$_POST['password'])or die("Connect Error: ".mysql_error()); print "Successfully connected.\n"; mysql_close($link); ?> </body> </html> The Web page is generated by a xxx.php file and what I want to be q quote is executed rather than displayed. I have tried to surround it with block formatting HTML elements such as <blockquote> or <pre> but the PHP code surrounded by "<?" and "?>" always get executed and throws errors. How can I simply quote it and display it on the page? Thank yoy Georges Georges Trottier wrote [edited]: > How can I simply quote and display [HTML with PHP code] on the page? How do you get the contents you're trying to display? Try these: http://www.php.net/htmlentities http://www.php.net/highlight_file -- Mail to my "From:" address is readable by all at http://www.dodgeit.com/ == ** ## !! ------------------------------------------------ !! ## ** == TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>) may bypass my spam filter. If it does, I may reply from another address! Georges Trottier wrote: > <html> > <head><title>Connect Serve...

Modify a php file(model) with php
I have an invoice model on my server! and i want to replace some field(like adresse, phone, price, VAT, ....) do you know a tools or class that allows those kind of manipulations Thanks you Yoni Yoni Alhadeff a �crit : > I have an invoice model on my server! and i want to replace some field(like > adresse, phone, price, VAT, ....) > > do you know a tools or class that allows those kind of manipulations > > Thanks you > > Yoni > > Couldn't you replace field with var and have them set when including your template (it become one in fact) ? I didn't understand good! I'm french speaker :p how can i replace field by var ? with a pdf that I make once at home! in my pdf i have line like this Adress: [Adr] Phone : [Tel] Number: [NBR] Article: [Article] And u want to replace the field under bracket! Thanks you Yoni "manu" <manu@netou.com> a �crit dans le message de news: 420e01ef$0$617$636a15ce@news.free.fr... > Yoni Alhadeff a �crit : > > I have an invoice model on my server! and i want to replace some field(like > > adresse, phone, price, VAT, ....) > > > > do you know a tools or class that allows those kind of manipulations > > > > Thanks you > > > > Yoni > > > > > Couldn't you replace field with var and have them set when including > your template (it become one in fact) ? ...

Web resources about - Get date from text/php-file #2 - comp.lang.php

Many High-Profile Firms Using Vulnerable PHP File Manager: Researcher
A researcher says he has identified several serious vulnerabilities in a PHP file manager application that is used by many high profile organizations. ...

PHP format music files - iLounge Article
... from Pure Volume that have .php extensions. I want to put them onto my iPod but couldn’t import them into iTunes or convert them to MP3 files.… ...

Resources last updated: 3/24/2016 5:36:21 AM