kyle056
May 5 2008, 11:31 PM
I am new to php and am following some tutorials that I found on the internet. I noticed that backslashes need to be used fairly often in php but cannot seem to get zymic to save them in my files. When I save a file that has a backslash in it, the saved file simply omits it. I have tried uploading files too in the same way and they backslashes in the code are all deleted. Am I doing something wrong? How can i fix this problem?
Jetteh22
May 7 2008, 07:42 AM
Post a copy of the PHP that you WANT to show
and a copy of the php that is SHOWING because I have no clue what you mean.
Westside Rep
May 7 2008, 08:08 PM
What he means is that if you make a php script with a string or something that has \r, \n, \t etc, Zymic automatically gets rid of the \n, \r, or any of the others. I've had this problem too.
Seems pretty pointless since it isnt a security risk, it's annoying.
Popcorn
May 8 2008, 12:48 AM
Use a FTP
kyle056
May 12 2008, 09:55 PM
So it is simply blocked by zymic altogether? Weird... I guess I will get myself an FTP then. Thanks!
Andrew
May 12 2008, 10:25 PM
I really have no idea what you mean, I have never had problems with php scripts, or writing my own. So unless you are using the stripslashes function then your account might be screwed up.
Bogey
May 23 2008, 04:03 AM
The following...
CODE
echo 'This is \'me\' speaking';
...turns into...
CODE
echo 'This is 'me' speaking';
Which would provide you with a PHP error message.
To tell you the truth, this doesn't provide a security risk so it shouldn't be anything... (That's how I understood the post).
If it's removing the \n, \r ... etc. Than the thing that saves them probably interprets that as new line or whatever. I guess this thing uses fwrite or something... file_put_contents is better and doesn't do that.
cpcnetworking
May 9 2009, 06:17 AM
..same here, using the web editor it strips the backslash char \n becomes n etc...
Andrew
May 9 2009, 05:20 PM
Stop using the editor online then. Create the documents on your computer and upload with FTP.
I'll look into fixing this.
Phoenixtears
May 30 2009, 02:45 AM
perhaps \ is used here as an escape character. Escape character is something after which the following word is ommitted if cant be processed like \n is for next line. So use a double \\ if u want put one valid back slash.
ditane
Aug 3 2009, 07:51 PM
Hate to dig up a somewhat old topic, but I just ran into this issue. Is there any word on getting the online editor to save "\"s properly?
I've tried editing locally and using ftp, but haven't been able to get ftp to work (I've also read that vndv has had trouble with FTP recently)
As somewhat a workaround I've found that "escaping" the backslash with another backslash works for one save, BUT in the saved file it still removes one of the backslashes (and leaves the other one). So if you save the file with say \\n it will convert it to \n in the saved file. If you then save it again, it converts the \n to just n. So if you save the file multiple times you need to "re-escape" the backslash before each new save.
Not the most elegant solution, but it works until I can either use FTP or the problem with the editor is resolved.
swordz
Aug 4 2009, 08:45 AM
We don't suggest using the online editor for php - it's designed for use as a WYSIWYG editor for very basic web pages. Use a text editor on your local machine and then ftp it up.
swordz
ditane
Aug 6 2009, 03:21 AM
QUOTE(swordz @ Aug 4 2009, 08:45 AM)

We don't suggest using the online editor for php - it's designed for use as a WYSIWYG editor for very basic web pages. Use a text editor on your local machine and then ftp it up.
swordz
Yeah, I know. And I would greatly prefer to work locally (Notepad++) and FTP upload myself. Its just that until now I had not been able to get the ftp for vndv to work. (I also read that it has had troubles previously with ftp). Now that I can get it to work I'll def. use that as much as possible, but it is good to know the (somewhat crude) solution of re-escaping the backslash every time the document is saved.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.