First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$image = "product.1.jpg";
|
||||
$image = "product(large).jpg";
|
||||
|
||||
$original = $image;
|
||||
|
||||
$image = str_replace('(','_',$image);
|
||||
$image = str_replace(')','',$image);
|
||||
|
||||
$segments = explode('.',$image);
|
||||
$nSegments = count($segments);
|
||||
$fname = "";
|
||||
$ext = $segments[$nSegments - 1];
|
||||
for ($i = 0; $i < $nSegments - 1; $i++) {
|
||||
if (strlen($fname)) $fname .= '.';
|
||||
$fname .= $segments[$i];
|
||||
}
|
||||
|
||||
echo("Image: $original\n");
|
||||
echo("Name: $fname\n");
|
||||
echo("Ext: $ext\n");
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user