All pastes #30071 Raw Edit

Unnamed

public text v1 · immutable
#30071 ·published 2005-11-21 20:48 UTC
rendered paste body
$basepath = $_SERVER['DOCUMENT_ROOT'] ;
$r_array=file('$basepath/quotes.txt');
shuffle($r_array);

then 

$r_array[0] SHOULD in theory output a random quote from the file quotes.txt however the varible $basepath is not being read. How do i properly include the var here?



TRY :

$r_array=file("$basepath/quotes.txt");