Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Résolu] petit soucis enphp

Featured Replies

Posté(e)

hello les INpactiens !

J'ai un p'tit soucis... Je modifie un peu de code php de mon forum en punbb et je n'arrive pas à faire ce que je veux...

Voici le code :

		$dst_w = 40; 
	$size = GetImageSize('img/smilies/'.$smiley_img[$i]);
	$src_w = $size[0];
echo 'coucou'.$smiley_img[$i];
	if ($src_w < $dst_w)
		$dst_w = $src_w;
	$text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" width='.$dst_w.' />$2', $text);

Quand je fais ça, seul "coucou" s'affiche, getimagesize "mange" mon image et en plus il donne pas la taille...

Il trouve l'image car si je modifie le path il m'affiche une erreur comme quoi il la trouve pas...

Donc là je coince un peu, j'avoue...

Posté(e)
  • Auteur

Laisse tomber theo chuis trop con...

Ca fait trop longtemps que j'ai fait du peucheupeu et à force de programmer en natural au taf je perds mes repères :(

Donc le problème était simplement que l'instruction au départ était

for blablabla

$text=blablablabla;

et moi j'ai rajouté des instructions mais sans mettre d'accolades...

Donc évidemment ça ne pouvait pas fonctionner...

*tyrann va se pendre...

Merci de m'avoir mis sur la voie :francais:

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.