PHP Code Doesn't Work After Duplicating

[font=arial][size=small]Hi, I am trying to accomplish what should be a very simple task: duplicating PHP code from one PHP file to another whilst getting both PHP files to work exactly the same. However, copying and pasting my PHP code from File 1 to File 2 causes File 2 to simply display a blank page whilst File 1 works perfectly fine. It’s EXACTLY the same code, with nothing different in the non-PHP code that could possibly cause File 2 to not work. Duplicating PHP code worked fine for me before now. I’m not sure what I could possibly be missing this time. Any help would be appreciated.[/size][/font]

[font=arial][size=small]In fact, I’ve tried leaving the NON-PHP code EXACTLY the same too, such that both files are essentially EXACTLY THE SAME in content. Yet File 1 works fine whilst File 2 still doesn’t work![/size][/font]

[font=arial][size=small]I just figured it out. It wasn’t really anything specifically related to PHP, although the error occurred within the PHP code. The issue was related to changes in syntax. For some reason duplicating the code modified it very slightly by causing a character to disappear - two actually - namely, a closing quote (") after each of two instances of a special character that acts as a parameter. Re-adding the quotes fixed the issue immediately.[/size][/font]

[font=arial][size=small]Apparently the editors I am using (Notepad or Notepad++, off or on SmartFTP) are unable to translate particular special characters (such as the pound symbol) upon duplication, which in turn causes any such character to revert to some alternative possibly unreadable character and/or cause the character’s closing quote to disappear. To resolve this issue, I must first duplicate the code, then copy and paste the special characters (e.g. the pound symbol), etc. to fix the syntax errors that occur upon duplication.[/size][/font]

Sponsor our Newsletter | Privacy Policy | Terms of Service