Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 55
Search took 0.20 seconds.
Search: Posts Made By: keys88
Forum: PHP 10-06-2012, 08:04 PM
Replies: 4
Views: 322
Posted By keys88
Thank you. Very helpful.

Thank you. Very helpful.
Forum: PHP 10-06-2012, 12:51 AM
Replies: 4
Views: 322
Posted By keys88
Thank you

Thank you.

I see I also had the open-brace in the wrong place.

I will use the relative reference.

For general knowledge: what's the drawback of using DOCUMENT_ROOT?

I thought it had the...
Forum: PHP 10-05-2012, 05:02 PM
Replies: 4
Views: 322
Posted By keys88
Reference in 'glob'

How would

$list=glob('{../pics/*.jpg,*JPG,*jpeg}',GLOB_BRACE);

need to be written with $_SERVER['DOCUMENT_ROOT'] in place of the relative reference?

I can't figure out those nested quote...
Forum: PHP 09-20-2012, 03:04 PM
Replies: 2
Views: 282
Posted By keys88
Cleared up

Thank you.

I've cleared it up now -- a tangle of small errors that were camouflaging each other.

Persistence really helps.
Forum: PHP 09-19-2012, 04:51 PM
Replies: 2
Views: 282
Posted By keys88
Header Location (redirect) problem

A gallery serves pages called like this (using htaccess DirectoryIndex and Rewrite) – /gallery/32
which serves
/gallery/index.php?page=32
On a first-visit call with no page request, it serves a...
Forum: PHP 09-18-2012, 01:47 AM
Replies: 2
Views: 254
Posted By keys88
Thank you!

Much appreciated.
Forum: PHP 09-16-2012, 01:43 PM
Replies: 2
Views: 254
Posted By keys88
Regex variant forms

I would appreciate a clue about regex variant forms.

In one text editor I use, removing bracketed footnotes like [3] and [16] from a text works well by finding with either of these expressions —...
Forum: Apache configuration 03-17-2011, 06:32 PM
Replies: 0
Views: 432
Posted By keys88
RewriteRule help

I would appreciate help with a RewriteRule.

This is nearly identical to other rules I use that work just fine, but something here isn’t right.

I have addresses that look like these:

...
Forum: PHP 02-15-2011, 03:45 PM
Replies: 2
Views: 443
Posted By keys88
preg_replace writing

I would like to know how to write the regular expression that will change any instance of this line, where the first three directories can vary (in different servers):

...
Forum: PHP 02-12-2011, 10:39 PM
Replies: 4
Views: 489
Posted By keys88
Thank you

Thanks so much for this. I hadn't been aware of the ob functions, so this is valuable learning.

As it happens, the files I'm working with here are straight text (passages of a book), not code,...
Forum: PHP 02-12-2011, 03:14 AM
Replies: 4
Views: 489
Posted By keys88
Answered

Oops. This was already answered -- from my own query.

Putting a php Include into a String
http://www.codingforums.com/showthread.php?t=205526

Is my face red!
Forum: PHP 02-12-2011, 02:04 AM
Replies: 4
Views: 489
Posted By keys88
Putting an 'include' text into a $string

How can a text brought into a file via an 'include' be put into a new string variable, using a some correct version of this code (which doesn't work):


$text=include('textfile.txt'); // wrong...
Forum: PHP 02-04-2011, 08:59 PM
Replies: 5
Views: 426
Posted By keys88
Thank you

$string = dirname( $string );


Oh - elegant! Thank you.
Forum: PHP 02-04-2011, 07:21 PM
Replies: 5
Views: 426
Posted By keys88
Thank you

Thank you. This works perfectly.

And yes, "regex_replace" above was a hasty goof. Correct in the code, fortunately.
Forum: PHP 02-04-2011, 06:58 PM
Replies: 5
Views: 426
Posted By keys88
regex help

I would like to know the regex expression to change

folder/sub1/sub2/sub3/file-name.txt

to

folder/sub1/sub2/sub3

The closest I’ve come is
Forum: PHP 02-04-2011, 02:41 AM
Replies: 6
Views: 801
Posted By keys88
Thank you

Thank you. This is all very valuable. Much appreciated.
Forum: PHP 02-03-2011, 03:53 PM
Replies: 6
Views: 801
Posted By keys88
Thanks so much. These answers are perfect. I...

Thanks so much. These answers are perfect. I understand '$key => $item' now.

As for the numbering, yes, I'm using "intuitive" item numbers ($array[3] is list item #3), leaving the [0] element...
Forum: PHP 02-03-2011, 03:03 PM
Replies: 6
Views: 801
Posted By keys88
Thank you. I'm slow to understand this. Here's a...

Thank you. I'm slow to understand this. Here's a simplified version of the code. This is for making an alphabetical index from a table of contents. Each index item becomes a form post to fetch the...
Forum: PHP 02-03-2011, 04:52 AM
Replies: 6
Views: 801
Posted By keys88
Getting key of item in foreach after asort

With an array that’s been sorted using asort which (I hope) retains the original key with each item, how do I get that original key for each item when moving through a foreach?

...
Forum: PHP 02-02-2011, 03:24 AM
Replies: 2
Views: 1,134
Posted By keys88
Thank you

Thank you!
Forum: PHP 02-01-2011, 01:17 AM
Replies: 2
Views: 1,134
Posted By keys88
Short-form 'if' syntax

Is there a way to write a short-form 'if' statement leaving the 'else' term blank?

Thus


if ($n>10) { echo $n ; } ;


written as a correct form of something like these (which are wrong)
Forum: PHP 01-25-2011, 07:12 PM
Replies: 6
Views: 602
Posted By keys88
Thank you

Thank you. Yes, this is very helpful.
Forum: PHP 01-25-2011, 03:37 PM
Replies: 6
Views: 602
Posted By keys88
Thank you

Thanks so much for these responses.

I was misunderstanding the php 'header'. I would like to be able to create a file in my Apache directory that would act like a Mac alias to another file...
Forum: PHP 01-25-2011, 03:51 AM
Replies: 6
Views: 602
Posted By keys88
Write an "alias" in php ?

Is there a way to write a simple php file to redirect within the site, without an external name server call?

These both work for me --

(1) for redirection --


header( 'Location:...
Forum: HTML & CSS 01-20-2011, 04:32 PM
Replies: 0
Views: 360
Posted By keys88
Width oddity in iPhone

My iPhone widths are displaying perfectly but they seem to need tiny adjustments that don’t make sense to me, and I would like to know why this happens.

First, here's the upstream code I'm using...
Showing results 1 to 25 of 55

 
Forum Jump

All times are GMT +1. The time now is 11:59 AM.