raimis100 Posted April 5, 2008 Share Posted April 5, 2008 The char / is at the end in the string String is $string = 'exemple/'; But the char / never appears in the string; what can I do about it Link to comment https://forums.phpfreaks.com/topic/99687-easy-question/ Share on other sites More sharing options...
kenrbnsn Posted April 5, 2008 Share Posted April 5, 2008 What do you mean? Please explain your question better? Ken Link to comment https://forums.phpfreaks.com/topic/99687-easy-question/#findComment-509979 Share on other sites More sharing options...
raimis100 Posted April 5, 2008 Author Share Posted April 5, 2008 OKey I have a script $directory = 'ducuments/xxx' $filename = 'script.php' $filepath = $directory . '/' . $filename; But it does not work! Link to comment https://forums.phpfreaks.com/topic/99687-easy-question/#findComment-509980 Share on other sites More sharing options...
kenrbnsn Posted April 5, 2008 Share Posted April 5, 2008 What does not work? When you do <?php echo $filepath . '<br>'; ?> what do you get? How are you using this variable? Are you getting any error messages? Ken Link to comment https://forums.phpfreaks.com/topic/99687-easy-question/#findComment-509981 Share on other sites More sharing options...
raimis100 Posted April 5, 2008 Author Share Posted April 5, 2008 Parse error: syntax error, unexpected T_STRING If I write 2 ' chars at the end I get ducuments/xxxscript.php And the char / is gone ! There was some kind of thing that if it was before ' then the ' becomes the string For exemple If You need to write a string You're you just add / before ' so it looks You/'re Sorry for my english Link to comment https://forums.phpfreaks.com/topic/99687-easy-question/#findComment-509986 Share on other sites More sharing options...
kenrbnsn Posted April 5, 2008 Share Posted April 5, 2008 Are you sure you're using a "/" and not a "\". There is a difference. The backslash is used to escape other characters and to insert one you need two. Can you post the code your actually using? Ken Link to comment https://forums.phpfreaks.com/topic/99687-easy-question/#findComment-509994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.