Jump to content

Recommended Posts

After using the many resources found on this site, i've got my script figured out except for this one part.  I'm trying to use the replace cmd to remove the spaces in the information given, convert it to underscores (just to create the folder) and then strip the underscore returning it to spaces when it's done and ready to post to the sql db.  My code gives me an error when using the replace cmd at all, so i'm not sure what i'm doing wrong.  Anyone have any ideas?  I'm actually close to getting this together thanks to everyone here.

 

str_replace(" ","_","$name" $mkdir("files/$name", 0755);

$image_part = date("")."".$HTTP_POST_FILES['file01']['name'];
$image_list[14] = $image_part;
copy($HTTP_POST_FILES['file01']['tmp_name'], "files/$name/".$image_part);
$image_part = date("")."".$HTTP_POST_FILES['file02']['name'];
$image_list[15] = $image_part;
copy($HTTP_POST_FILES['file02']['tmp_name'], "files/$name/".$image_part);
$image_part = date("")."".$HTTP_POST_FILES['file03']['name'];
$image_list[16] = $image_part;
copy($HTTP_POST_FILES['file03']['tmp_name'], "files/$name/".$image_part);
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));

Link to comment
https://forums.phpfreaks.com/topic/71546-solved-replace-cmd/
Share on other sites

Everything works great, the only thing I have a problem with is that if the customer name (and its dir) already exists, it outputs an error instead of appending.. shouldn't it just append?

 

It did actually finish the script, though.  It just output an error.

Link to comment
https://forums.phpfreaks.com/topic/71546-solved-replace-cmd/#findComment-360254
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.