473,473 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

file reference "\n" characters interpreted as carriage return

4 New Member
Is there a method I can use so functions don't interpret "\n" as a carriage return in file references?

EXAMPLE

Function call:
imagecreatefromjpeg("C:\Documents and Settings\nxxxx\Desktop\button.jpg");
Results:
Warning: imagecreatefromjpeg(C:\Documents and Settings xxxx\Desktop\button.jpg): failed to open stream: No such file or directory
Jun 20 '07 #1
2 1658
snaeher
4 New Member
Format file references using:
addcslashes($fileref, "\n\r")
Is there a method I can use so functions don't interpret "\n" as a carriage return in file references?

EXAMPLE

Function call:
imagecreatefromjpeg("C:\Documents and Settings\nxxxx\Desktop\button.jpg");
Results:
Warning: imagecreatefromjpeg(C:\Documents and Settings xxxx\Desktop\button.jpg): failed to open stream: No such file or directory
Jun 20 '07 #2
pbmods
5,821 Recognized Expert Expert
Heya, snaeher.

You might find escapeshellarg() useful.
Jun 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: nicholas4 | last post by:
I need help with writing a script that returns a zip file. if(1 == $download){ // Setup headers for zip file // Return zip file // Afterwards, display previous php page } Can you help with...
6
by: cgbusch | last post by:
"Character reference "&#c" is an invalid XML character" With JDOM and Xerces in Java, I get the above error with sequences. I need to be able to encode arbitrary char sequences in xml. any...
1
by: Junior | last post by:
I keep receiving this "The type or namespace name 'CASsEventHandler' could not be found (are you missing a using directive or an assembly reference?)" message in two particular lines, and I've...
5
by: stephane | last post by:
Hi, I don't know how to test something. I read at file.txt caracter by caracter And I would like to know when it is the end of my line in the text file. exemple of a line: ...
7
by: Drew Berkemeyer | last post by:
I've encounted a pretty strange problem and I'm not quite sure what to make of it. I have a web service that consumes an XML file as well as a few other parameters. This web service works fine...
5
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use...
9
by: Anubhav Jain | last post by:
Hi, I am having few .net source files(.cs or .vb) and I want to dynamically generate the corresponding .net project file(.csproj or .vbproj) for them without using visual studio.So that I could...
4
by: Neelesh Bodas | last post by:
Just wondering about exact terminology used by the standard to describe a reference. More specifically, is "reference" a type? int i = 10; // type of i is int int &ri = i; // ri is declared...
8
Motoma
by: Motoma | last post by:
Good evening everyone. I am starting to re-explore C++, and I wanted to build a singleton class. Unfortunately, when I set things up as I do in PHP, it doesn't work out for me. I hope that the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.