|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi all
I have run a simple "hello world" test include script and it worked! I got "Hello World" printed on the browser screen.... This is good from a point of knowing includes do work but BAD from not knowing what the problem is causing my script not to work! When I run my script I get this exact message Parse error. Parse error, unexpected T_STRING in C:\www\webroot\phpauctionXL\includes\config.inc.ph p on line 28 The extract below is out of my config.inc.php and I have used three >>> to highlight line 28 starting $image_upload_path... Can anyone see anything wrong with these paths?? That is the "absolute" path to the dir but I am unsure if I may have put it wrong somehow?I am baffled!! ps/I have Windows XP, PHP 4.3.8, Apache 2.0.5, Php myadmin etc Any help from anyone gratefully received...... ////start of extract from config.inc.php //-- This is the directory where passwd.inc.php file resides - requires ending slash $include_path = "C:\www\webroot\includes\"; //-- This is the directory where users pictures will be uploaded - requires ending slash //-- Under Windows use something like C:\path\to\you\uploaddir\ >>> $image_upload_path= "C:\www\webroot\phpauctionXL\uploaded\"; $uploaded_path = "uploaded\"; ////end of extract Thankyou in advance |
|
#2
|
|||
|
|||
|
With strings, the backslash is used to escape special characters like quotation marks.
Because of the backslash preceding the end quote, php thinks the string is still open $include_path = "C:\www\webroot\includes\"; In any event, I would change all file path backslashes to forwardslashes. Reason being, - php won't confuse them as escape characters - Unix based systems use forwardslashes for file paths - Windows uses both forward and back |
|
#3
|
|||
|
|||
|
Quote:
Thanks for that info oyegeorge. I will change all paths to that format and post back.. Also, will a double // effectively cancel out the escape character?? TIA |
|
#4
|
||||
|
||||
|
You could use either forward slashes, or double blackslashes...
I'm pretty sure your particular error is because of the final backslash and closing quote... telling PHP to ignore the quote. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Parse error: unexpected T_STRING??Advice Please! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|