PHP Open File - fopen() A better method to open files is with the fopen() function. This function gives you more options than the readfile() function.. We will use the text file, "webdictionary.txt", during the lessons:
Window open() Method - W3Schools Optional. Specifies the URL of the page to open. If no URL is specified, a new window/tab with about:blank is opened: name: Optional. Specifies the target attribute or the name of the window. The following values are supported: _blank - URL is loaded into a new window, or tab. This is default; _parent - URL is loaded into the parent frame open new window with php code after form submits results open new window with php code after form submits results. Ask Question Asked 7 years, 9 months ago. Active 4 years, 2 months ago. still the same results it opens another tab and displays "window.open..170)" as text even with script tag – Link Sep 6 '12 at 0:49. add a comment |
PHP CANNOT open a new window. It CANNOT control client side behaviour.
Current PHP versions take this into account and add the quotes automatically, but old versions didn't. Apparently, the change was made in PHP/5.3.0 yet not backported to 5.2.x because it's a backwards incompatible change. To sum up: - In PHP/5.2 and older you have to surround the full command plus arguments in double quotes
The syntax of the window.open method is given below: open (URL, windowName[, windowFeatures]) URL The URL of the page to open in the new window. This argument could be blank. windowName A name to be given to the new window. The name can be used to refer this window again.