хочу отделить статью с ингредиентами чтоб и в категории тоже были одни ингредиенты
дело в том что редактор не работает. всмысле жирным и прочее не работает
часть сделал, но могу разделить статью---------- Добавлено 06.05.2018 в 12:37 ----------Хочу отделить статью Рис, угорь, унаги соус, кунжут. и ниже была другая частьи статьи или под спойлер спрятано. Так же сделать в категориях , чтоб в описании вино что ингредиенты.
index.html
<html><body><embed width="400" height="400" src="circle_svg.php" name="printable"type="image/svg+xml" /></body></html>
circle_svg.php
<?phpheader( "content-type: text/xml" );$points_count = 20;$points = array( );for( $p=0; $p<$points_count; $p++ ){ $d = ( 360 / $points_count ) * $p; $x = 50 + ( cos( deg2rad( $d ) ) * 50 ); $y = 50 + ( sin( deg2rad( $d ) ) * 50 ); $points []= array( 'x' => $x, 'y' => $y );}echo ("<?xml version=\"1.0\" standalone=\"no\"?>\n" );?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN""http://www.w3.org/TR/SVG/DTD/svg10.dtd"><svg style="shape-rendering:geometricPrecision;" viewBox="0 0 100 100" xmlspace="preserve" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet"><?phpforeach( $points as $start ) { $sx = $start['x']; $sy = $start['y']; foreach( $points as $end ) { $ex = $end['x']; $ey = $end['y'];?><path fill-rule="nonzero" style="fill:#000000;stroke:#FF0000;stroke-width:0.2"d="M<?php echo( $sx." ".$sy ); ?> L<?php echo( $ex." ".$ey ); ?> Z"/><?php} }?></svg>
Ошибка синтаксического анализа XML: некорректно
Адрес: http://php/Code/%d0%93%d0%bb%d0%b0%d0%b2%d0%b0%204.%20%d0%93%d1%80%d0%b0%d1%84%d0%b8%d0%ba%d0%b0/%d0%a2%d1%80%d1%8e%d0%ba%2028.%20%d0%a1%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5%20%d0%ba%d1%80%d0%b0%d1%81%d0%b8%d0%b2%d1%8b%d1%85%20%d1%80%d0%b8%d1%81%d1%83%d0%bd%d0%ba%d0%be%d0%b2%20%d0%bf%d1%80%d0%b8%20%d0%bf%d0%be%d0%bc%d0%be%d1%89%d0%b8%20SVG/circle_svg.php
Строка 5, символ 1:space="preserve" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://
^
не знаю там вроде не написано
в книге написано что все должно работать
спасибо теперь понял что это папка
а что такое каталог
а что делать
в чем проблема
а что мне сделать с путем
index.php
<?php$dh = new DirectoryIterator( "pics" );$files = array( );foreach( $dh as $file ){ if ( preg_match( "/[.]jpg$/", $file ) ) $files []= "$file";}?><html><head><title>Slideshow</title><style>body { background: black; }#thumbnails { height: 140px; width: 100%; overflow: auto; }#pic { text-align: center; height: 400px; padding: 20px; }</style><script>var image_list = [ <?php $first = true; foreach( $files as $image ) { ?><?php echo( $first ? "" : ", " ); ?>"<?php echo( $image ); ?>"<?php $first = false; } ?>];var curimage = 0;function switchimg( ind ){ var image = image_list[ind]; var obj = document.getElementById( "selimg" ); obj.src = "scale.php?image="+image+"&y=400"; curimage = ind;}function nextimage( ){ curimage++; if ( curimage >= image_list.length ) curimage = 0; switchimg( curimage );}window.setInterval( "nextimage( )", 2000 );</script></head><body><div id="thumbnails"><table width="100%"><tr><?php $ind = 0; foreach( $files as $image ) { ?><td width="160" nowrap align="center"><a href="javascript:switchimg( <?php echo($ind); ?> )"><img height="100" src="scale.php?image=<?php echo($image); ?>&y=100" border="0" /></a></td><?php $ind++; } ?></tr></table></div><div id="pic"><img id="selimg" height="400" src="scale.php?image=<?php echo($files[0]);?>&y=400" /></div></body>
scale.php
<?php$image = $_GET["image"];$maxy = $_GET["y"];$im = @imagecreatefromjpeg( "pics/".$image );$curx = imagesx( $im );$cury = imagesy( $im );$ratio = $maxy / $cury;$newx = $curx * $ratio;$newy = $cury * $ratio;$oim = imagecreatetruecolor( $newx, $newy );imageantialias( $oim, true );imagecopyresized( $oim, $im, 0, 0, 0, 0,$newx, $newy, $curx, $cury );header( "content-type: image/jpeg" );imagejpeg( $oim );?>
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct(pics,pics): �� ������ ����� �������� ����. (code: 2) in E:\OpenServer\domains\php\Code\Глава 3. DHTML\Трюк 21. Создание просмотрщика слайдов при помощи DHTML\index.php:2 Stack trace: #0 E:\OpenServer\domains\php\Code\Глава 3. DHTML\Трюк 21. Создание просмотрщика слайдов при помощи DHTML\index.php(2): DirectoryIterator->__construct('pics') #1 {main} thrown in E:\OpenServer\domains\php\Code\Глава 3. DHTML\Трюк 21. Создание просмотрщика слайдов при помощи DHTML\index.php on line 2---------- Добавлено 11.04.2018 в 14:53 ----------а разница какая
сделал как просили