loading html templates

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

No replies · 312 views · started 16 years ago · 1 min read

ori Lead · 512 posts #1

does anyone know how to set curl to load templates from a local url "./templates/index.html" rather then "http://site/templates/index.html" heres my curl code

$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, http://site/templates/$temp.html);
curl_setopt($cURL, CURLOPT_HEADER, 0);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($cURL);
curl_close($cURL);

i had to remove this from template directory

<Files 403.shtml> order allow,deny allow from all </Files> deny from all

so now the folder can be accessed but with that curl code it only works with it off

i previously used file_get_contents to do this but it doesnt work on the server anymore am unsure why...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close