[PHP]Hoe zet ik een URL in array

Pagina: 1
Acties:
  • 320 views

Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Beste Allemaal,

Ben al een tijdje aan het stoeien met het opensource mail project POMMO mail.
De mogelijkheid om plaatjes toe te voegen aan emails moet zelf ingebouwd worden.
Hiervoor maak ik gebruik van tinymce en de plugin tinybrowser.
De volgende gegevens heb ik in de code:

code:
1
2
3
4
// File upload paths (set to absolute by default)
$tinybrowser['path']['image'] = '/mailing/useruploads/images/'; // Image files location - also creates a '_thumbs' subdirectory within this path to hold the image thumbnails
$tinybrowser['path']['media'] = '/mailing/useruploads/media/'; // Media files location
$tinybrowser['path']['file']  = '/mailing/useruploads/files/'; // Other files location


code:
1
2
3
4
// File link paths - these are the paths that get passed back to TinyMCE or your application (set to equal the upload path by default)
$tinybrowser['link']['image'] = $tinybrowser['path']['image']; // Image links
$tinybrowser['link']['media'] = $tinybrowser['path']['media']; // Media links
$tinybrowser['link']['file']  = $tinybrowser['path']['file']; // Other file links


Het probleem is als ik de mailtjes verstuur worden de plaatjes toegevoegd met src="/mailing/useruploads/images/plaatje.jpg"

voor dit path moet eigenlijk nog de URL te staan dus: http://www.domein.com/path/...etc.

De code moet er dus alsvolgt uit komen te zien: $tinybrowser['link']['image'] = $tinybrowser[URLHIER]['path']['image']; // Image links

ik krijg het niet voor elkaar...ben helaas ook niet echt een PHP'r
Is er een simple manier om dit voor elkaar te krijgen?
Bedankt alvast!

Acties:
  • 0 Henk 'm!

Verwijderd

Dat staat in: $_SERVER['HTTP_HOST']

:?

Toch?

Acties:
  • 0 Henk 'm!

  • E-Vix
  • Registratie: Juni 2000
  • Laatst online: 19-09 14:42

E-Vix

Nu met sneeuw!

PHP:
1
$tinybrowser['link']['image'] = $variabele_met_je_url_er_in . $tinybrowser['path']['image'];

Zoiets bedoel je? Twee strings kan je gewoon met een . achter elkaar plakken in php...

Failed opening '/home/users/7942/signature.inc' for inclusion (include_path='.:') in /home/www/got/userstats.php on line 25


Acties:
  • 0 Henk 'm!

  • Archiebald
  • Registratie: Juni 2006
  • Laatst online: 19:24
en anders even een
PHP:
1
2
3
<pre>
<?php print_r($_SERVER);?>
</pre>

doen, dan kun je zien welke je nodig hebt.

Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
E-Vix schreef op vrijdag 17 juli 2009 @ 12:59:
PHP:
1
$tinybrowser['link']['image'] = $variabele_met_je_url_er_in . $tinybrowser['path']['image'];

Zoiets bedoel je? Twee strings kan je gewoon met een . achter elkaar plakken in php...
Super! Inderdaad...dit heeft het opgelost :*) Bedankt...en sorry voor de noobie vraag :X

Acties:
  • 0 Henk 'm!

  • Woy
  • Registratie: April 2000
  • Niet online

Woy

Moderator Devschuur®
Dit is ook wel een erg basic vraag. PRG is niet bedoelt om een vraag te dumpen. We verwachten hier wel dat mensen zich verdiepen in de materie.

Met een simpele PHP tutorial had je er ook achter kunnen komen hoe je 2 strings achter elkaar had kunnen plakken.

Lees ook het PRG beleid eens door.

“Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.”

Pagina: 1

Dit topic is gesloten.