![]() |
|
#1
|
||||
|
||||
echo <<< doesn't work...Hey everybody
,It's my first week of PHP/MySQL and i am working on a uploader/editor of DB online. While reading around to solve the never ending mysteries, i found an echo function written: PHP Code:
PHP Code:
Since my php file has now more than 400 lines, it would be very time saving to use echo<<< instead of echo ""; However. This doesn't work for me for some reason. When i try it, i get: Quote:
Can somebody please tell me how to fix that. Is it from the php version i am using, or is it from the configuration files? Apache/2.0.48 (Win32) PHP/4.3.4 Server at localhost Port 80 Thank You |
|
#2
|
||||
|
||||
|
Hello pepee,
I was just glancing through the "What's new in PHP 4.3.5" and didn't notice a bugfix with the HEREDOC syntax in version 4.3.4. Maybe you could go through the list thoroughly or check the bug list. However, I also use 4.3.4 on my local machine (win32) and just ran your code and it worked fine. Perhaps it's an issue with other code inside your script? Was this all the code in the PHP page when you tested it? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
||||
|
||||
|
Yes, it was the only thing:
PHP Code:
|
|
#4
|
||||
|
||||
|
Instead of using DW, can you try creating that file with Notepad and saving it (replacing the DW version) and view the page again? Just to rule out DW as the culprit.
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
||||
|
||||
|
made a new file.txt
put the code, saved it, renamed it, ran it. same thing happens. (hehe, like a poem LOL) |
|
#6
|
||||
|
||||
|
I don't know pepee, like I said, the code example you pasted worked well on my test server.
You could try a few other minor things at least until you get this working:
This may be unrelated to the issue but it will not hurt to rule it out as well. Don't use the preview in browser via DW. View the page from http://localhost ? |
|
#7
|
||||
|
||||
|
very strange just copied the code straight from here and got the same error yet when I copied the code from the original script it worked, however both are the same!
used PHP Code:
Very confused! |
|
#8
|
||||
|
||||
|
JDS:
OK. I will stick to those rules. I only don't understand the third bulletpoint. gardolas: haha, tanx man, that made things easier |
|
#9
|
||||
|
||||
|
In DW, click Edit -> Preferences.
Select Code Rewriting under Categories, in the box next to Never Rewrite Code (on the right), add .php __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#10
|
||||
|
||||
|
It is already set so. I guess this is the default. But tanx, i know what this is now.
|
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in | ukrspp21 | MySQL / PHP Forum | 31 | 04-Jul-2006 21:41 |
| Why doesnt my form work correctly? | rhino1616 | Web Design Forum | 2 | 06-Nov-2003 17:21 |
| How do web redirection scripts work? | rhino1616 | Web Design Forum | 9 | 27-Oct-2003 09:47 |
| Add a tool to a yet written code-help would be great! | norok | MySQL / PHP Forum | 2 | 14-Jul-2003 10:30 |
| A very good sitemap script | jrobbio | MySQL / PHP Forum | 3 | 03-Mar-2003 01:07 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The