nCPGc: personal help request nCPGc: personal help request
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

nCPGc: personal help request

Started by boii, October 23, 2003, 08:42:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

boii

hey guys,

i have a quick php question of related matter, and thought this woudl be the best palce to ask, i sincerely aprologize to gaugau, tarique etc if this is out of line (i've given much support/code that i thoguth maybe this coudl be "okay").

in any case:

can someone show me the quick php code, whereby filenames with a space are converted to an underscore. im havign some issues with fielnames that contain spaces so id liek to be able to strip the space and convert it to an underscore either on uplaod or before imagemagick hits them to resize em. id appreicate if anyone has a way to do this (i knwo its fairly simple, but not an area of coding that im familair with).

much appreicated.

cheers.
ken

Tarique Sani

OK this once it is allowed ;)

you can use
str_replace(" ","_",$filename);

A search of manual in string functions will give you more tricks on string manipulation
SANIsoft PHP applications for E Biz