php-general Digest 25 Nov 2007 07:01:30 -0000 Issue 5146

Topics (messages 264998 through 265002):

Re: Performance question for table updating (SOLVED)
        264998 by: Robert Cummings

URL Parsing...
        264999 by: Amanda Loucks
        265000 by: tedd
        265001 by: Jochem Maas

Adv. photo scripts
        265002 by: PHP-General

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Sat, 2007-11-24 at 04:03 -0700, Jon Westcot wrote:
> 
>     Moral of the story?  Two, really.  First, ensure you always reference
> values in the way most appropriate for their type.  Second, don't make your
> idiocy public by asking stupid questions on a public forum. <g>  What's the
> quote (probably attributed to Churchill)?  "It is better to be ignorant and
> silent than to voice one's opinions and remove all doubt." ;)

I don't think that phrase applies to your situation... I'd say you did
the right thing. Far too often people are afraid of reprisal or seeming
stupid and so a problem doesn't get solved until it's far too late and
its effects become magnified. Here's a more apt quote for your
situation:

    "It's better to be an idiot for 10 minutes than a failure for
     the rest of your life."

    -- Me :)

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Hi,

I'm working on redesigning the backend of the website for work.  It was
originally done in ColdFusion, but I'm switching it over to PHP - probably
going to transfer the website from where it's currently hosted to something
a lot cheaper, too, hence the switching to PHP.  Anyway.

Because we are a manufacturing company, we have a few different lines of
products.  Currently, each different product line has it's own page (and own
meta tags).  The current set up has ColdFusion grabbing the current page
from the URL stripping off the '.cfm' extension and adding '-meta.cfm'
before including it in the header.

I'm sure there is a way to do this in PHP, but I'm out of shape enough with
using PHP that I can't remember, and I can't seem to find anything that will
work for me.  I just want to be able to pull whatever address is in the URL,
get the file name, and go from there.

Any ideas?

Anything would be helpful.  :)

Thanks,
Amanda

--- End Message ---
--- Begin Message ---
At 12:18 PM -0600 11/24/07, Amanda Loucks wrote:
Hi,

I'm working on redesigning the backend of the website for work.  It was
originally done in ColdFusion, but I'm switching it over to PHP - probably
going to transfer the website from where it's currently hosted to something
a lot cheaper, too, hence the switching to PHP.  Anyway.

Because we are a manufacturing company, we have a few different lines of
products.  Currently, each different product line has it's own page (and own
meta tags).  The current set up has ColdFusion grabbing the current page
from the URL stripping off the '.cfm' extension and adding '-meta.cfm'
before including it in the header.

I'm sure there is a way to do this in PHP, but I'm out of shape enough with
using PHP that I can't remember, and I can't seem to find anything that will
work for me.  I just want to be able to pull whatever address is in the URL,
get the file name, and go from there.

Any ideas?

Anything would be helpful.  :)

Thanks,
Amanda

From what I've read recently about meta tags, why?

Most SE's have dropped their dependance on meta tags because of their abuse.

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Amanda Loucks wrote:
> Hi,
> 
> I'm working on redesigning the backend of the website for work.  It was
> originally done in ColdFusion, but I'm switching it over to PHP - probably
> going to transfer the website from where it's currently hosted to something
> a lot cheaper, too, hence the switching to PHP.  Anyway.
> 
> Because we are a manufacturing company, we have a few different lines of
> products.  Currently, each different product line has it's own page (and own
> meta tags).  The current set up has ColdFusion grabbing the current page
> from the URL stripping off the '.cfm' extension and adding '-meta.cfm'
> before including it in the header.
> 
> I'm sure there is a way to do this in PHP, but I'm out of shape enough with
> using PHP that I can't remember, and I can't seem to find anything that will
> work for me.  I just want to be able to pull whatever address is in the URL,
> get the file name, and go from there.
> 
> Any ideas?

one of these should give you something to go on:

echo preg_replace('\.cfm$', '-meta.cfm', parse_url($_SERVER['REQUEST_URI'], 
PHP_URL_PATH)), "\n";
echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['PATH_TRANSLATED']), "\n";
echo preg_replace('\.cfm$', '-meta.cfm', $_SERVER['SCRIPT_FILENAME']), "\n";

> 
> Anything would be helpful.  :)
> 
> Thanks,
> Amanda
> 

--- End Message ---
--- Begin Message ---
Not sure if I'm at the right place but here goes....

I'm trying to create a script that will let users upload photos. It is a high traffic site and I've been told its best to create a function that will generate a unique filename for a temp. file, put the temp file elsewhere on the server, and then use an (unlink???) function to delete the temp. file after it gets written to the d-base.

How would I do that?
--- End Message ---

Reply via email to