[webshop] telkens errors

Gestart doorPotloodjes13 reacties40 weergaven

14 berichten · pagina 1 van 1

Potloodjes

Lid · Topicstarter

Berichten
2.399
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

sindskort heb ik via sitedeals een licentie gekocht van een 1 product webshop. Deze werkt inprincipe helemaal naar behoren, maar er zit nog enkele foutjes in. Wie kan mij hiermee helpen? heb verder niet echt ervaring hierin. De maker van het script, wilt me helaas niet hierbij helpen..

Heb er al aardig wat uitgevist, alleen de laatste snap ik niet.

Als je naar de website gaat, en je klikt op bestellen krijg je deze foutmelding:

Warning: Cannot modify header information - headers already sent by (output started at /home/sigaret/domains/elektrischeminisigaret.nl/public_html/index.php:14) in /home/sigaret/domains/elektrischeminisigaret.nl/public_html/inc/flourish/fURL.php on line 188
http://elektrischeminisigaret.nl/order.php]


de code:

Quote:

Codeblok (voorbeeld.php):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283


/**
* Provides functionality to retrieve and manipulate URL information
*
* This class uses `$_SERVER[REQUEST_URI]` for all operations, meaning that
* the original URL entered by the user will be used, or that any rewrites
* will **not** be reflected by this class.
*
* @copyright Copyright (c) 2007-2011 Will Bond
* @author Will Bond [wb]
* @license http://flourishlib.com/license
*
* @package Flourish
* @link http://flourishlib.com/fURL
*
* @version 1.0.0b10
* @changes 1.0.0b10 Fixed some method signatures [wb, 2011-08-24]
* @changes 1.0.0b9 Fixed ::redirect() to handle no parameters properly [wb, 2011-06-13]
* @changes 1.0.0b8 Added the `$delimiter` parameter to ::makeFriendly() [wb, 2011-06-03]
* @changes 1.0.0b7 Fixed ::redirect() to be able to handle unqualified and relative paths [wb, 2011-03-02]
* @changes 1.0.0b6 Added the `$max_length` parameter to ::makeFriendly() [wb, 2010-09-19]
* @changes 1.0.0b5 Updated ::redirect() to not require a URL, using the current URL as the default [wb, 2009-07-29]
* @changes 1.0.0b4 ::getDomain() now includes the port number if non-standard [wb, 2009-05-02]
* @changes 1.0.0b3 ::makeFriendly() now changes _-_ to - and multiple _ to a single _ [wb, 2009-03-24]
* @changes 1.0.0b2 Fixed ::makeFriendly() so that _ doesnt appear at the beginning of URLs [wb, 2009-03-22]
* @changes 1.0.0b The initial implementation [wb, 2007-06-14]
*/

class fURL
{
// The following constants allow for nice looking callbacks to static methods
const get = fURL::get;
const getDomain = fURL::getDomain;
const getQueryString = fURL::getQueryString;
const getWithQueryString = fURL::getWithQueryString;
const makeFriendly = fURL::makeFriendly;
const redirect = fURL::redirect;
const removeFromQueryString = fURL::removeFromQueryString;
const replaceInQueryString = fURL::replaceInQueryString;

/**
* Returns the requested URL, does no include the domain name or query string
*
* This will return the original URL requested by the user - ignores all
* rewrites.
*
* @return string The requested URL without the query string
*/

static public function get()
{

return preg_replace(#?.*$#D, , $_SERVER[REQUEST_URI]);
}


/**
* Returns the current domain name, with protcol prefix. Port will be included if not 80 for HTTP or 443 for HTTPS.
*
* @return string The current domain name, prefixed by `http://` or `https://`
*/

static public function getDomain()
{

$port = (isset($_SERVER[SERVER_PORT])) ? $_SERVER[SERVER_PORT] : NULL;
if (isset($_SERVER[HTTPS]) && $_SERVER[HTTPS] == on) {
return https:// . $_SERVER[SERVER_NAME] . ($port && $port != 443 ? : . $port : );
}
else {
return http:// . $_SERVER[SERVER_NAME] . ($port && $port != 80 ? : . $port : );
}
}


/**
* Returns the current query string, does not include parameters added by rewrites
*
* @return string The query string
*/

static public function getQueryString()
{

return preg_replace(#^[^?]*??#, , $_SERVER[REQUEST_URI]);
}


/**
* Returns the current URL including query string, but without domain name - does not include query string parameters from rewrites
*
* @return string The URL with query string
*/

static public function getWithQueryString()
{

return $_SERVER[REQUEST_URI];
}


/**
* Changes a string into a URL-friendly string
*
* @param string $string The string to convert
* @param integer $max_length The maximum length of the friendly URL
* @param string $delimiter The delimiter to use between words, defaults to `_`
* @param string |$string
* @param string |$delimiter
* @return string The URL-friendly version of the string
*/

static public function makeFriendly($string, $max_length=NULL, $delimiter=NULL)
{

// This allows omitting the max length, but including a delimiter
if ($max_length && !is_numeric($max_length)) {
$delimiter = $max_length;
$max_length = NULL;
}


$string = fHTML:SMILEYYYYYYYYYYYBEGIN:decode(fUTF8::ascii($string));
$string = strtolower(trim($string));
$string = str_replace("", , $string);

if (!strlen($delimiter)) {
$delimiter = _;
}


$delimiter_replacement = strtr($delimiter, array(\ => \\, $ => \$));
$delimiter_regex = preg_quote($delimiter, #);

$string = preg_replace(#[^a-z0-9-_]+#, $delimiter_replacement, $string);
$string = preg_replace(# . $delimiter_regex . {2,}#, $delimiter_replacement, $string);
$string = preg_replace(#_-_#, -, $string);
$string = preg_replace(#(^ . $delimiter_regex . +| . $delimiter_regex . +$)#D, , $string);

$length = strlen($string);
if ($max_length && $length > $max_length) {
$last_pos = strrpos($string, $delimiter, ($length - $max_length - 1) * -1);
if ($last_pos < ceil($max_length / 2)) {
$last_pos = $max_length;
}

$string = substr($string, 0, $last_pos);
}


return $string;
}


/**
* Redirects to the URL specified, without requiring a full-qualified URL
*
* - If the URL starts with `/`, it is treated as an absolute path on the current site
* - If the URL starts with `http://` or `https://`, it is treated as a fully-qualified URL
* - If the URL starts with anything else, including a `?`, it is appended to the current URL
* - If the URL is ommitted, it is treated as the current URL
*
* @param string $url The url to redirect to
* @return void
*/

static public function redirect($url=NULL)
{

if (strpos($url, /) === 0) {
$url = self::getDomain() . $url;

}
elseif (!preg_match(#^https?://#i, $url)) {

$prefix = self::getDomain() . self::get();

if (strlen($url)) {
// All URLs that have more than the query string need to
// be appended to the current directory name

if ($url[0] != ?) {
$prefix = preg_replace(#(?<=/)[^/]+$#D, , $prefix);
}


// Clean up ./ relative URLS
if (substr($url, 0, 2) == ./) {
$url = substr($url, 2);
}


// Resolve ../ relative paths as far as possible
while (substr($url, 0, 3) == ../) {
if ($prefix == self::getDomain() . /) { break; }
$prefix = preg_replace(#(?<=/)[^/]+/?$#D, , $prefix);
$url = substr($url, 3);
}
}


$url = $prefix . $url;
}


// Strip the ? if there are no query string parameters
if (substr($url, -1) == ?) {
$url = substr($url, 0, -1);
}


header(Location: . $url);
exit($url);
}


/**
* Removes one or more parameters from the query string
*
* This method uses the query string from the original URL and will not
* contain any parameters that are from rewrites.
*
* @param string $parameter A parameter to remove from the query string
* @param string ...
* @return string The query string with the parameter(s) specified removed, first character is `?`
*/

static public function removeFromQueryString($parameter)
{

$parameters = func_get_args();

parse_str(self::getQueryString(), $qs_array);
if (get_magic_quotes_gpc()) {
$qs_array = array_map(stripslashes, $qs_array);
}


foreach ($parameters as $parameter) {
unset($qs_array[$parameter]);
}


return ? . http_build_query($qs_array, , &);
}


/**
* Replaces a value in the query string
*
* This method uses the query string from the original URL and will not
* contain any parameters that are from rewrites.
*
* @param string|array $parameter The query string parameter
* @param string|array $value The value to set the parameter to
* @return string The full query string with the parameter replaced, first char is `?`
*/

static public function replaceInQueryString($parameter, $value)
{

parse_str(self::getQueryString(), $qs_array);
if (get_magic_quotes_gpc()) {
$qs_array = array_map(stripslashes, $qs_array);
}


settype($parameter, array);
settype($value, array);

if (sizeof($parameter) != sizeof($value)) {
throw new fProgrammerException(
"There are a different number of parameters and values.
Parameters:
%1$s
Values
%2$s"
,
$parameter,
$value
);
}


for ($i=0; $i<sizeof($parameter); $i++) {
$qs_array[$parameter[$i]] = $value[$i];
}


return ? . http_build_query($qs_array, , &);
}


/**
* Forces use as a static class
*
* @return fURL
*/

private function __construct() { }
}


/**
*
Copyright (c) 2007-2011 Will Bond <will@flourishlib.com>
*
*
Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,


Eerder dit hij het wel, maar als ik het opnieuw upload doet hij het nog niet. Wat is hier mis aan, aan lijn 188? Wie weet het?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Mag ik de code zien die je hebt aangepast?
0
Potloodjes

Lid · Topicstarter

Berichten
2.399
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Codeblok (voorbeeld.php):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162


session_start();
?>


// Initialise Flourish Library
include_once(inc/init.php);

// Get product information
$product = pProduct::getProduct();
$product_images = pProduct::getImages();

session_start();
// Process form
if (fRequest::isPost()) {
$amount = fRequest::get(amount);
$_SESSION[amount]=$amount;
fURL::redirect(order.php);
}

?>




<span style="color: #0000BB;"><?php</span> <a href="http://www.php.net/echo" target="_blank" rel="noopener noreferrer">echo</a> WEBSITE_TITLE<span style="color: #007700;">;</span> ?>
include_once(meta.inc.php); ?>





include_once(header.inc.php); ?>


Previous slide
Next slide

    foreach ($product_images as $p_img) {
    echo
  • Afbeelding niet beschikbaarDe oorspronkelijke afbeelding of link ontbreekt..
  • $p_img["image_url"]." />;
    }

    ?>

echo $product[name]; ?>

Product informatie

echo $product[description]; ?>

Voor 16:00 besteld, morgen in huis

    if(TARGETPAY_STATUS == 1) {
    if(PAYSAFE_STATUS == 1) { echo
  • PaysafeCard
  • ; }
    if(IDEAL_STATUS == 1) { echo
  • iDeal
  • ; }
    if(BANCONTACT_STATUS == 1) { echo
  • Bancontact
  • ; }
    }

    if(PAYPAL_STATUS == 1) {
    echo
  • PayPal
  • ;
    }

    ?>





Afbeelding Wat zeggen onze klanten

Zeer snelle levering! Binnen een dag had ik hem al op de mat.
Helaas paste de ring mij niet en kon ik hem gratis omruilen voor een kleinere! Het werkt

Janette Verschuren

Zeer snelle levering! Binnen een dag had ik hem al op de mat.
Helaas paste de ring mij niet en kon ik hem gratis omruilen voor een kleinere! Het werkt

Janette Verschuren

Zeer snelle levering! Binnen een dag had ik hem al op de mat.
Helaas paste de ring mij niet en kon ik hem gratis omruilen voor een kleinere! Het werkt

Janette Verschuren

include_once(footer.inc.php); ?>







Is de gehele code, heb enkel google analystics erin gestopt. Maar als ik bijv een tekstje of zinnetje wijzigt, komen er gelijk nog meer errors bij, met allemaal de zelfde tekst..
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
kan het zijn dat er onzichtbare tekens boven aan je file zitten?
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Convert naar UTF-8 without BOM in je editor.
0
Potloodjes

Lid · Topicstarter

Berichten
2.399
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
Convert naar ANSI-Without BOM in je editor.
hoe doe je dat als ik vragen mag? heb hier niet zo heel veel ervaring mee..
Kunt u mischien helpen?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Potloodjes schreef:
Eerdere citaten tonen
Dylanh schreef:
Convert naar ANSI-Without BOM in je editor.
hoe doe je dat als ik vragen mag? heb hier niet zo heel veel ervaring mee..
Kunt u mischien helpen?
Menig goede editor kan dat wel?
Notepad++ bijv.

of zelfs de normale Notepad, door het opnieuw op te slaan.
0
Potloodjes

Lid · Topicstarter

Berichten
2.399
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik gebruik kladblok, doe dit al jaren; en werkt inprincipe even fijn..
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Potloodjes schreef:
Ik gebruik kladblok, doe dit al jaren; en werkt inprincipe even fijn..
Kladblok is echt geen goede editor, wat je nu doet kan met een redelijke editor veel sneller...

Maar goed, neem aan dat het opgelost is? Want ik vermoed dat het met de BnopompomM te maken heeft.
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Potloodjes schreef:
Ik gebruik kladblok, doe dit al jaren; en werkt inprincipe even fijn..
je programmeert niet al jaren als je zegt dat je al jaren kladblok gebruikt...
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Open het eens in DA en kijk of er rare tekens boven aan de pagina staan, dit was ook een keer bij mij het geval.
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Potloodjes schreef:
Eerdere citaten tonen
Dylanh schreef:
Convert naar ANSI-Without BOM in je editor.
hoe doe je dat als ik vragen mag? heb hier niet zo heel veel ervaring mee..
Kunt u mischien helpen?
Notepad++ > Encoding > Encode in UTF-8 without BOM

en natuurlijk converten naar UTF-8 without BOM voor bestaande code.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Open het eens in DA en kijk of er rare tekens boven aan de pagina staan, dit was ook een keer bij mij het geval.
Zeg maar Filemanager van Direct Admin ... DA is zo algemeen
0
Potloodjes

Lid · Topicstarter

Berichten
2.399
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
Eerdere citaten tonen
Potloodjes schreef:
Eerdere citaten tonen
Dylanh schreef:
Convert naar ANSI-Without BOM in je editor.
hoe doe je dat als ik vragen mag? heb hier niet zo heel veel ervaring mee..
Kunt u mischien helpen?
Notepad++ > Encoding > Encode in UTF-8 without BOM

en natuurlijk converten naar UTF-8 without BOM voor bestaande code.
Hiermee lukte het, heb notepad++ gedownload, en het werkt weer zonder errors.

Hartelijk dank, hierop kan een slotje.

toevoeging op 19 december 2013, 17:31:34:
Nieuwe vraag, heb de topic tekst veranderd. Wie kan me hiermee helpen? Is de laatste foutmelding, rest heb ik er al uit..
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren